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

Unexpected token: keyword «const» #839

Closed
thinkmai opened this issue Sep 11, 2019 · 6 comments
Closed

Unexpected token: keyword «const» #839

thinkmai opened this issue Sep 11, 2019 · 6 comments

Comments

@thinkmai
Copy link

thinkmai commented Sep 11, 2019

  • G6 Version:3.0.5
  • Platform:
  • Mini Showcase(like screenshots):
  • CodePen Link:
    build的时候报Unexpected token: keyword «const»,用3.0.5.beta.7没问题,请问这个是什么引起的呢?
@baizn
Copy link
Contributor

baizn commented Sep 11, 2019

能提供详细的保存信息吗,刚试了下本地build没报错。

@baizn
Copy link
Contributor

baizn commented Sep 11, 2019

你参考yeyan1996/vue2-admin#2这个看下,uglifyjs-webpack-plugin插件不支持ES6 webpack-contrib/uglifyjs-webpack-plugin#362,建议将uglifyjs-webpack-plugin换成uglify-js

@thinkmai
Copy link
Author

谢谢,已经解决

@yesmeck
Copy link

yesmeck commented Sep 20, 2019

这个问题还存在的,构建出来的文件里包含 const,低版本浏览器里无法运行。

@baizn
Copy link
Contributor

baizn commented May 7, 2020

3.4.9 版本修复了 #1541

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

3 participants