From 70c4efa9e85441734f9fd5d25c1cee4bec185d1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Poizat?= Date: Tue, 16 Dec 2025 11:25:00 +0100 Subject: [PATCH] feat(rsbuild): Enable source map in production Source map in production will help debugging in production (especially if we use it with Sentry). It should slightly increase build time (no issue as it is only some ms during CI) and it will reveal our source code entirely (no issue as we are open source). --- config/rsbuild-config-cozy-app/getRsbuildConfig.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/rsbuild-config-cozy-app/getRsbuildConfig.js b/config/rsbuild-config-cozy-app/getRsbuildConfig.js index c0d2101c56..36c404c3e8 100644 --- a/config/rsbuild-config-cozy-app/getRsbuildConfig.js +++ b/config/rsbuild-config-cozy-app/getRsbuildConfig.js @@ -73,7 +73,9 @@ function getRsbuildConfig({ auto: resource => resource.endsWith('.styl') }, // We enable old API polyfill to keep compatibility with old browsers - polyfill: 'usage' + polyfill: 'usage', + // We enable source map to simplify production debugging + sourceMap: true }, performance: { chunkSplit: {