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

根据dva框架创建的项目无法解析G6的ES6语法 #335

Closed
nsuedu opened this issue Jun 22, 2018 · 7 comments
Closed

根据dva框架创建的项目无法解析G6的ES6语法 #335

nsuedu opened this issue Jun 22, 2018 · 7 comments

Comments

@nsuedu
Copy link

nsuedu commented Jun 22, 2018

./node_modules/@antv/g6/plugins/tool.minimap/index.js
Module parse failed: Unexpected token (18:6)
You may need an appropriate loader to handle this file type.
| return graph;
| },
| ...this.options
| });
| graph.on('afterchange', () => {

@TomHuangCN
Copy link
Contributor

...this.options

应该是你的 loader 识别不了这种写法,改一下 babel 的配置

@dangyyeo
Copy link

dangyyeo commented Nov 8, 2018

@nsuedu 遇到了同样的问题,请教下怎么解决的。

@nsuedu
Copy link
Author

nsuedu commented Nov 8, 2018

在 webpack 配置文件中加上一行 " extraBabelIncludes: ["node_modules/@AntV"],"

@nsuedu
Copy link
Author

nsuedu commented Nov 8, 2018

@oangy

@dangyyeo
Copy link

dangyyeo commented Nov 8, 2018

@nsuedu 完美解决,多谢。

@475533819
Copy link

@nsuedu
image
image
我加了,但是不行哎

@nsuedu
Copy link
Author

nsuedu commented Dec 11, 2019

@475533819 看看这个:sorrycc/blog#68

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

4 participants