cnpm install -g @vue/cli
#全局安装 Electron
cnpm install electron -g
vue create demo4
#注:不要选择ts 否则需要安装另外的插件转换
cd demo4
vue add electron-builder
运行
npm run electron:serve
编译打包
npm run electron:build
#vue add electron-builder | npm add electron-builder
app.on('ready', async () => {
..... 注释掉这段代码
createWindow()
})
// Exit cleanly on request from parent process in development mode.
if (isDevelopment) {
......注释掉这段代码
}