Skip to content

Build your personal knowledge base with Trilium Notes

chore: disable source maps

Elian Doran7863a5e09c04
diff --git a/apps/client/vite.config.mts b/apps/client/vite.config.mts
index a3f00a714e..95bff36e24 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 c1d704813e..15b56a7364 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 87640e7020..afa67c0507 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": {