Electron 本来应该用 commonJS 规范的,也就是最早在 nodejs 平台下的推出的规范
用Webpack 转一下就可以了
所有Electron 相关代码也是用的ES6 module
Yue Yang
@g1eny0ung
加个微信吧等你看到了 @Rapiz1 ,我周末 Gitter 消息就回复的不太那么及时了
Yujia Qiao
@rapiz1
我微信号是 rapiz35
Yue Yang
@g1eny0ung
加了
Yujia Qiao
@rapiz1
Petal是用typescript编写的吗
我用vscode打开,尝试import第三方模块,提示缺少声明文件
无法找到模块“mpris-service”的声明文件。“/home/rapiz/Source/Petal/node_modules/mpris-service/dist/index.js”隐式拥有 "any" 类型。 Try npm install @types/mpris-service if it exists or add a new declaration (.d.ts) file containing declare module 'mpris-service';ts(7016)
Yujia Qiao
@rapiz1
没有理这个东西实现了功能之后一跑
./node_modules/dbus-next/lib/address-x11.js
Module not found: Can't resolve 'x11' in '/home/rapiz/Source/Petal/node_modules/dbus-next/lib'