From 7863a5e09c04246d88dc3f0e1546ffc2bc88ce79 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Wed, 11 Jun 2025 22:03:25 +0300 Subject: [PATCH] chore: disable source maps --- apps/client/vite.config.mts | 2 +- apps/desktop/package.json | 15 ++++++++++++--- apps/server/package.json | 13 +++++++++++-- 3 files changed, 24 insertions(+), 6 deletions(-) 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": {