diff --git a/electron/electron-env.d.ts b/electron/electron-env.d.ts index 5f0b7f5..683a865 100644 --- a/electron/electron-env.d.ts +++ b/electron/electron-env.d.ts @@ -6,6 +6,6 @@ declare namespace NodeJS { DIST_ELECTRON: string DIST: string /** /dist/ or /public/ */ - PUBLIC: string + VITE_PUBLIC: string } } \ No newline at end of file diff --git a/electron/main/index.ts b/electron/main/index.ts index 38bbb63..9eb5399 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -44,7 +44,7 @@ const indexHtml = join(process.env.DIST, 'index.html') async function createWindow() { win = new BrowserWindow({ title: 'Main window', - icon: join(process.env.VITE_PUBLIC!, 'favicon.ico'), + icon: join(process.env.VITE_PUBLIC, 'favicon.ico'), webPreferences: { preload, // Warning: Enable nodeIntegration and disable contextIsolation is not secure in production