From e75d885a2cfed98acf628c1aa9e59a7e020f9695 Mon Sep 17 00:00:00 2001 From: eternal-flame-AD Date: Mon, 11 Nov 2024 02:29:47 -0600 Subject: [PATCH] enable sourceMap on frontend Signed-off-by: eternal-flame-AD --- packages/frontend/vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend/vite.config.ts b/packages/frontend/vite.config.ts index 504562a91e..647fe4cf9b 100644 --- a/packages/frontend/vite.config.ts +++ b/packages/frontend/vite.config.ts @@ -148,6 +148,7 @@ export function getConfig(): UserConfig { }, chunkFileNames: process.env.NODE_ENV === 'production' ? '[hash:8].js' : '[name]-[hash:8].js', assetFileNames: process.env.NODE_ENV === 'production' ? '[hash:8][extname]' : '[name]-[hash:8][extname]', + sourcemap: true, paths(id) { for (const p of externalPackages) { if (p.match.test(id)) { @@ -163,7 +164,7 @@ export function getConfig(): UserConfig { outDir: __dirname + '/../../built/_frontend_vite_', assetsDir: '.', emptyOutDir: false, - sourcemap: process.env.NODE_ENV === 'development', + sourcemap: true, reportCompressedSize: false, // https://vitejs.dev/guide/dep-pre-bundling.html#monorepos-and-linked-dependencies