diff --git a/bun.lockb b/bun.lockb index 224584023..e38d4455c 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/electron/main.ts b/electron/main.ts index 2e9004385..f1f527c60 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -29,7 +29,11 @@ function createWindow(): void { mainWindow?.webContents.send('main-process-message', new Date().toLocaleString()) }) - mainWindow.loadFile(join(ROOT_PATH.dist, 'index.html')) + if (process.env.VITE_DEV_SERVER_URL) { + mainWindow.loadURL(process.env.VITE_DEV_SERVER_URL) + } else { + mainWindow.loadFile(join(ROOT_PATH.dist, 'index.html')) + } } app.on('window-all-closed', () => { diff --git a/package.json b/package.json index 44e99bd06..81af0af61 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "tailwindcss": "^3.2.6", "typescript": "~5.4.4", "vite": "5.2.8", - "vite-plugin-electron": "^0.9.3", + "vite-plugin-electron": "^0.28.8", "vite-plugin-pwa": "^0.19.8", "vite-plugin-vuetify": "^1.0.0-alpha.16", "vitest": "^0.20.3", diff --git a/vite.config.ts b/vite.config.ts index 8957b4dd4..e2f838505 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,10 +9,13 @@ const path = require('path') // eslint-disable-line @typescript-eslint/no-var-re export default defineConfig({ plugins: [ electron({ - main: { - entry: 'electron/main.ts', + entry: 'electron/main.ts', + vite: { + build: { + outDir: 'dist/electron', + }, }, - }).filter((configuration) => configuration.apply === 'build'), + }), vue(), vuetify({ autoImport: true,