Electron not support for es6 import
来源:2-3 进程间通信

Astrogladiator
2019-06-14
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
写回答
1回答
-
张轩
2019-06-14
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.
00
相似问题