-
Notifications
You must be signed in to change notification settings - Fork 294
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
编译后出现 Uncaught SyntaxError: Unexpected token '...' #255
Comments
我认为这其实算是esbuild的pure组件bug,需要看下它的配置项是否允许例外,将node_modules排除 |
我看到esbuild的issue有讨论类似问题,不过没有提到node_modules内部出现此类问题的情况,我空的时候去问下。你也可以找找是否有关闭pure配置以外的其他途径。 |
能提供下你的框架环境吗?我需要尝试复现这个问题。 |
https://github.com/vbenjs/vue-vben-admin 如果用一个最小的 vue3+vite, 配置上 esbuild.pure 应该也可以复现。 |
已提交issue,esbuild反馈是bug,之后会修复。
|
esbuild 中配置了 pure, 移除了所有 console.log 后, 会出现错误信息:
找到原因,是因为这个文件
https://github.com/mirari/v-viewer/blob/v3/src/directive.ts
98行 log 方法里 console.log(...args), 被 esbuild 去除了 console.log 后, 代码变成了:
有什么办法能解决这个问题呢?
The text was updated successfully, but these errors were encountered: