2021-11-08 20:16:39 +08:00
2021-11-05 16:52:09 +08:00
2021-11-08 10:21:15 +08:00
2021-11-08 20:16:09 +08:00
2021-05-30 07:50:29 +08:00
2021-07-04 18:00:36 +08:00
2021-11-04 14:26:18 +08:00
2021-05-30 08:24:29 +08:00
2021-11-08 10:20:30 +08:00
2021-11-08 09:59:55 +08:00
2021-09-09 09:36:06 +08:00
2021-11-08 10:20:30 +08:00

electron-vue-vite

GitHub stars GitHub forks GitHub issues GitHub license

🥳 Simple Electron + Vue3 + Vite2 boilerplate. Build based on rollup and vite.

Feature

  • HRM

    • Main process hot restart
    • Preload script hot reload
    • Renderer process hot module replacement -- power by Vite
  • Beautiful log -- power by concurrently

    • [R] means Renderer process
    • [P] means Preload script
    • [M] means Main process

Run Setup

# clone the project
git clone git@github.com:caoxiemeihao/electron-vue-vite.git

# enter the project directory
cd electron-vue-vite

# install dependency(Recommend use yarn)
yarn

# develop
yarn dev

Communication

  • All NodeJs、Electron API invoke passed Preload script

    • src/preload/index.ts

      // --------- Expose some API to Renderer process. ---------
      contextBridge.exposeInMainWorld('fs', fs)
      contextBridge.exposeInMainWorld('ipcRenderer', ipcRenderer)
      
    • typings/global.d.ts

      interface Window {
        fs: typeof import('fs')
        ipcRenderer: import('electron').IpcRenderer
      }
      
    • src/render/main.ts

      console.log('fs', window.fs)
      console.log('ipcRenderer', window.ipcRenderer)
      

Branchs

  • ant-design-vue
    • Use tsx
    • Integration ant-design-vue
  • element-plus 登录窗口、element-ui 这个可能很适合你 🚀
    • With multiple BrowserWindow
    • Integration element-plus

Mian window

Wechat group

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