error Compile error: Failed to compile, check the errors for troubleshooting. File: ./node_modules/element-ui/packages/scrollbar/src/main.js × Module parse failed: ╰─▶ × JavaScript parsing error: Expected ',', got 'ref' ╭─[64:1] 64 │ const wrap = ( 65 │ <div 66 │ ref="wrap" · ─── 67 │ style={ style } 68 │ onScroll={ this.handleScroll } ╰──── help: You may need an appropriate loader to handle this file type. #2173
Unanswered
lorsque-sir
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
使用rebuild重构旧项目,为什么还会编译node_modules下的elementui组件,而且我也按照文档配置了jsx
export default defineConfig({ plugins: [ pluginVue2(), pluginVue2Jsx({ vueJsxOptions: { injectH: false, }, }), pluginBabel({ include: /\.(?:jsx|tsx)$/, exclude: /[\\/]node_modules[\\/]/, }), pluginStylus(), ], source: { include: [{ not: /[\\/]node_modules[\\/]/ }], // 指定入口文件 entry: { index: './src/main.js', }, alias: { '@': './src', assets: './src/assets', '@/*': './src/*', }, }, })
Beta Was this translation helpful? Give feedback.
All reactions