请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Electron not support for es6 import

it is very pity for me that electron can not support es6 import syntax.
https://stackoverflow.com/questions/35374353/es6-syntax-import-electron-require
we have to compile it with babel plugin instead

正在回答 回答被采纳积分+3

插入代码

1回答

张轩 2019-06-14 12:29:45

Electron based on Node.js, we can't use es6 import for node right now. But we can use lots of workarounds. Babel is one way to do that. check out this link https://stackoverflow.com/questions/45854169/how-can-i-use-an-es6-import-in-node for more info.

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号