请稍等 ...
×

采纳答案成功!

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

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下载
官方微信