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 export #546

Closed
webup opened this issue Jan 3, 2018 · 0 comments
Closed

Unexpected token export #546

webup opened this issue Jan 3, 2018 · 0 comments
Labels

Comments

@webup
Copy link

webup commented Jan 3, 2018

Environment(required) | 环境(必填)

  • roadhog version(roadhog版本)2.0.1
  • Nodejs and Npm version(Nodejs 和 Npm 版本)9.3.0
  • Operating environment (e.g. OS name) and its version(操作系统版本): macOS 10.12.6

What did you do? Please provide steps to re-produce your problem.(请提供复现步骤)

参看 ant-design/ant-design-pro#542 升级到2.0之后,使用.webpackrc.js的形式编写roadhog配置,并使用ES6的语法来 export default {}

What do you expected?(预期的正常效果)

执行roadhog dev应正常运行

What happen?(发生了何种非正常现象)

报错 Unexpected token export,如换成module.exports可正常运行,但在webpack.config.js中也会报错无法识别import/export等ES6语法。之前1.x都是没问题的。项目无额外babel配置文件,也执行过yarn upgrade清理并重新安装了所有其它依赖库。

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

No branches or pull requests

2 participants