抛弃掉繁重的Webpack吧!
- Vite 2.6.7
- ESBuild 0.13.6
- Electron 15.1.2
- React 17.0.2
- Typescript 4.4.4
// 从 私有源 进行克隆
$ git clone https://git.acgme.cn/saya/vite-electron-app.git --depth=1
// 从 Github 源进行克隆
$ git clone https://github.com/AlishaHawkward/vite-electron-app.git --depth=1
主入口: ./src/background.ts
渲染入口: ./src/main.tsx
$ npm run dev
$ npm run build
$ npm run lint
$ npm run lint:fix
清空dist目录: npm run clean
-
在渲染进程中使用
window.ipcRenderer.send()
来向主进程发送通信。 -
在主进程中使用
window.ipcRenderer.on()
来接受渲染进程发送来的消息。
-
主进程和渲染进程之间使用 ipcRenderer 进行通讯。
-
你可以在任何地方使用和分发本项目,但是如果你要开源发布,希望您可以保留当前README.MD。
-
尽情的使用吧!