skymoonya / rsbuild-plugin-vue-legacy

Support for Vue versions below 2.7 by setting an alias for vue (switch vue version in the project to 2.7)
MIT License
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

Dengpei1688 commented 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:

tools: {

bundlerChain: (chain, { env, isProd, target, CHAIN_ID }) => {

  chain.module
    .rule("vue")
    .use("vux-cli3-loader")
    .loader("vux-cli3-loader")
    .before("vue-loader");

} }

skymoonya commented 1 month ago

应该是可以处理的,而且这个报错看起来不是 rsbuild-plugin-vue-legacy 的问题