*https://blog.csdn.net/LPJCSY/article/details/123084442

cnpm install -g @vue/cli
#全局安装 Electron 
cnpm install electron -g

vue create demo4
cd demo4
vue add electron-builder

修改background.ts
app.on('ready', async () => {
  ..... 注释掉这段代码
  createWindow()
})

// Exit cleanly on request from parent process in development mode.
if (isDevelopment) {
  ......注释掉这段代码
}


安装typescript和ts-loader
npm install typescript
npm install ts-loader@8.4.0 #注意版本太高会报错



运行
npm run electron:serve

编译打包
npm run electron:build