Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用了istanbul做测试覆盖率,希望能阻止istanbul对template部分的插桩处理 #2034

Open
Losstie opened this issue Apr 4, 2023 · 0 comments

Comments

@Losstie
Copy link

Losstie commented Apr 4, 2023

问题描述

之前使用istanbul做覆盖率时不会对template进行插桩编译,但是删除lock文件重新安装依赖后istanbul也会对template部分插桩,由于我们使用远程服务器做覆盖率,使得一份.vue文件对应了两份覆盖率的计数器和文件结构,所以冲突了。
更新前依赖
vue-loader: 15.9.8
vue/vue-template-compiler: 2.6.14

更新后依赖
vue-loader: 15.10.1
vue/vue-template-compiler : 2.7.14

why?

想询问一下vue是否有做相关调整,导致项目引入的istanbul也会对template部分进行处理?对比前后验证了很久没找到是哪个依赖项更新导致的这个变化。

How?

想请教一下是否能够拦截掉某个babel插件对template进行处理?或者babel编译中能否识别vue的template部分(感觉不行,istanbul处理时已经是render函数)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant