diff --git a/electron/main/index.ts b/electron/main/index.ts index c76425f2..050f6820 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -10,9 +10,9 @@ const __dirname = dirname(__filename) // // ├─┬ dist-electron // │ ├─┬ main -// │ │ └── index.mjs > Electron-Main +// │ │ └── index.js > Electron-Main // │ └─┬ preload -// │ └── index.mjs > Preload-Scripts +// │ └── index.js > Preload-Scripts // ├─┬ dist // │ └── index.html > Electron-Renderer // @@ -40,7 +40,7 @@ if (!app.requestSingleInstanceLock()) { let win: BrowserWindow | null = null // Here, you can also use other preload -const preload = join(__dirname, '../preload/index.mjs') +const preload = join(__dirname, '../preload/index.js') const url = process.env.VITE_DEV_SERVER_URL const indexHtml = join(process.env.DIST, 'index.html') diff --git a/package.json b/package.json index 57e295e1..cd180361 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "electron-vue-vite", "version": "28.0.0", - "main": "dist-electron/main/index.mjs", + "main": "dist-electron/main/index.js", "description": "Really simple Electron + Vue + Vite boilerplate.", "author": "草鞋没号 <308487730@qq.com>", "license": "MIT", @@ -31,7 +31,7 @@ "tree-kill": "^1.2.2", "typescript": "^5.3.3", "vite": "^5.0.10", - "vite-plugin-electron": "^0.28.0-beta.1", + "vite-plugin-electron": "^0.28.0-beta.2", "vite-plugin-electron-renderer": "^0.14.5", "vue": "^3.4.1", "vue-tsc": "^1.8.27"