Skip to content
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

加入report-error之后自动包了try、catch, webpack过不去 #4

Open
likegun opened this issue Jan 9, 2018 · 1 comment
Open

Comments

@likegun
Copy link

likegun commented Jan 9, 2018

因为在文件最上层也包了try catch,webpack报 Module build failed: SyntaxError: 'import' and 'export' may only appear at the top level (2:2) 错误,请问该如何解决?

@jacksky007
Copy link
Owner

@likegun 目前的实现是希望在原有的构建步骤后面追加一次 try ... catch ... 的 wrapper,所以等于是在打包完成后的代码基础上进行处理,不知道你的构建任务是否方便调整。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants