diff --git a/apps/client/vite.config.mts b/apps/client/vite.config.mts index a3f00a714..95bff36e2 100644 --- a/apps/client/vite.config.mts +++ b/apps/client/vite.config.mts @@ -70,7 +70,7 @@ export default defineConfig(() => ({ outDir: './dist', emptyOutDir: true, reportCompressedSize: true, - sourcemap: process.env.NODE_ENV === "production", + sourcemap: false, rollupOptions: { input: { desktop: join(__dirname, "src", "desktop.ts"), diff --git a/apps/desktop/package.json b/apps/desktop/package.json index c1d704813..15b56a736 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -48,6 +48,17 @@ "outputs": [ "{options.outputPath}" ], + "defaultConfiguration": "production", + "configurations": { + "production": { + "minify": true, + "sourcemap": false + }, + "development": { + "minify": false, + "sourcemap": true + } + }, "options": { "main": "apps/desktop/src/electron-main.ts", "outputPath": "apps/desktop/dist", @@ -63,10 +74,8 @@ "format": [ "cjs" ], - "minify": true, "thirdParty": true, - "declaration": false, - "sourcemap": true, + "declaration": false, "esbuildOptions": { "splitting": false, "loader": { diff --git a/apps/server/package.json b/apps/server/package.json index 87640e702..afa67c050 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -268,6 +268,17 @@ "^build", "client:build" ], + "defaultConfiguration": "production", + "configurations": { + "production": { + "minify": true, + "sourcemap": false + }, + "development": { + "minify": false, + "sourcemap": true + } + }, "options": { "main": "apps/server/src/main.ts", "outputPath": "apps/server/dist", @@ -283,10 +294,8 @@ "cjs" ], "declarationRootDir": "apps/server/src", - "minify": true, "thirdParty": true, "declaration": false, - "sourcemap": true, "esbuildOptions": { "splitting": false, "loader": {