From 84145de2cc306c009f4566acfee131da14bcf6d6 Mon Sep 17 00:00:00 2001 From: itsamejms Date: Thu, 5 Mar 2026 21:57:15 +0000 Subject: [PATCH] trying to deal with the build error --- .gitignore | 5 ++++- electron/main.js | 2 +- package.json | 3 ++- vite.config.js | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 40b878d..d0ae852 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -node_modules/ \ No newline at end of file +node_modules/ +dist/ +release/ +.DS_Store \ No newline at end of file diff --git a/electron/main.js b/electron/main.js index a91784a..c5eb290 100644 --- a/electron/main.js +++ b/electron/main.js @@ -2,7 +2,7 @@ import { app, BrowserWindow } from 'electron'; import path from 'path'; import { fileURLToPath } from 'url'; -const isDev = process.env.NODE_ENV !== 'production'; +const isDev = !app.isPackaged; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); diff --git a/package.json b/package.json index f2240f3..885ac53 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ "package.json" ], "directories": { - "buildResources": "build" + "buildResources": "build", + "output": "release" } } } diff --git a/vite.config.js b/vite.config.js index 5567f84..df217e2 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' export default defineConfig({ + base: './', plugins: [react(), tailwindcss()], server: { port: 5173,