Vue项目报错: parser: "babylon" } is deprecated; we now treat it as { parser: "babel"
报错信息如下18% building modules 68/88 modules 20 active ...gnss-mine-ui\src\components\Login.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.This dependency was not ...
·
报错信息如下
18% building modules 68/88 modules 20 active ...gnss-mine-ui\src\components\Login.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
This dependency was not found:
* !!vue-style-loader!css-loader?{"sourceMap":true}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-ef68022e","scoped":false,"hasInlineConfig":false}!sas
s-loader?{"sourceMap":true}!../../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector?type=styles&index=0!./Login.vue in ./src/components/Login.vue
解决方法
找到/node_modules/vue-loader/lib/template-compiler/index.js, 然后修改代码
if (!isProduction) {
code = prettier.format(code, { semi: false, parser: 'babylon' })
}
//babylon改为babel
if (!isProduction) {
code = prettier.format(code, { semi: false, parser: 'babel' })
}
更多推荐
已为社区贡献3条内容
所有评论(0)