采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
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
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.
登录后可查看更多问答,登录/注册
站内首门Electron课程,让你更专注应用的核心开发
938 11
1.6k 9
903 7
1.1k 7
848 7