-
Notifications
You must be signed in to change notification settings - Fork 14
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
builderror #6
Comments
can you provide a minimal repo link that can reproduce the problem you ran into?or just list the source code that cause the error |
#6 (comment) |
可以提供下报错的文件或者截图么 |
antd引入的一个插件报错了,配了external不打包他了 |
你解决了吗 |
需要下载一个包 @rollup/plugin-commonjs import commonjs from '@rollup/plugin-commonjs' plugins: [ |
开发环境的时候正常,打包构建的时候如果fileRegex写了/.js$|.jsx$|.vue$/就报错
vite.config.js:
defineConfig({
plugins: [
requireTransform({
fileRegex: /.js$|.jsx$|.vue$/,
})
],
})
只写.vue正常打包
requireTransform({
fileRegex: /.vue$/,
}),
错误日志
✓ 516 modules transformed.
[vite_plugin_require_transform] Unexpected token (1:33) - make sure this is an expression.
The text was updated successfully, but these errors were encountered: