2021-05-23 20:37:41 +08:00
2021-05-23 20:37:41 +08:00
2021-02-19 14:26:29 +08:00
2021-05-23 18:06:31 +08:00
2021-05-16 20:14:05 +08:00
2020-08-31 09:50:57 +08:00
2020-08-16 20:42:52 +08:00
2021-02-18 21:38:06 +08:00
2021-05-08 17:35:20 +08:00
2021-05-15 21:03:21 +08:00
2021-05-23 14:48:11 +08:00
2021-05-23 14:48:01 +08:00

electron-vue-vite

Electron + Vue3 + Vite2 integration

How and Why

  • Vite is the scaffold of the future

Command

  • npm run dev
  • npm run build

Note

  • In the development environment, we need to transform the Electron related API into commonjs

  • And you can only use ESM

  • So far, I've written an vitejs-plugin-electron plugin

    import { ipcRenderer } from 'electron'
    import Store from 'electron-store'
    // Will generate
    const { ipcRenderer } = require("electron")
    const Store = require("electron-store")
    
  • It works!

  • 🚀

  • 开发模式下 Electron 相关的 API 需要转换成 commonjs

  • 并且你只能用 ESM

  • 为此我写了一个 vitejs-plugin-electron 插件

electron-vue-vite-webpack



License

MIT License

Description
No description provided
Readme MIT 22 MiB
Languages
TypeScript 72.7%
Vue 13.7%
CSS 10.3%
HTML 3.3%