Support for Vue versions below 2.7 by setting an alias for vue (switch vue version in the project to 2.7)
7
stars
0
forks
source link
在vue2.6版本的三方框架vux项目报错提示You may need an additional loader to handle the result of these loaders #1
Open
Dengpei1688 opened 1 month ago
请问rsbuild-plugin-vue-legacy能够处理三方框架node_modules目录下vue2.6版本的编译吗?
报错代码如下: node_modules/vux/src/components/actionsheet/index.vue?vue&type=custom&index=0&blockType=i18n:1:1 × Module parse failed: ╰─▶ × JavaScript parsing error: Expected ';', '}' or
╭─[4:7]
2 │ cancel:
3 │ en: cancel
4 │ zh-CN: 取消
· ─
╰────
help: File was processed with these loaders:
/node_modules/vux-cli3-loader/index.js You may need an additional loader to handle the result of these loaders.
请问大佬有对应的解决方案吗?
rsbuild项目配置: source: { // 指定入口文件 entry: { index: "/src/main.js" }, // node_modules目录下需要编译ES6语法的库 include: ["vux"], alias: { '@': path.resolve(__dirname, 'src'), }, extensions: [".js", ".json", ".wasm", '.vue', '.jsx', '.tsx'] },
tools: {
} }