This commit is contained in:
2026-05-21 00:35:43 +08:00
parent 2e8ee357d5
commit 9b60807cca
5 changed files with 14 additions and 132 deletions
+14
View File
@@ -126,6 +126,20 @@ ipcMain.handle('get-data', () => {
└─────────────────────────────────────────────────────────┘
```
```
┌─────────────┬─────────────────────────────────────────┐
│ 旧文件 │ → 新文件 │
├─────────────┼─────────────────────────────────────────┤
│ main.js │ src/main/index.ts │
├─────────────┼─────────────────────────────────────────┤
│ preload.js │ src/preload/index.ts │
├─────────────┼─────────────────────────────────────────┤
│ index.html │ src/renderer/index.html │
├─────────────┼─────────────────────────────────────────┤
│ renderer.js │ src/renderer/src/components/Counter.vue │
└─────────────┴─────────────────────────────────────────┘
```
electron-vite 自动处理:
- 主进程和预加载脚本的 CommonJS/ESM 兼容
- 渲染进程的热模块替换 (HMR)