From fe3ed17610f1724cc2f5a15e818140771c0fd1d5 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sun, 19 Mar 2023 18:25:00 +0100 Subject: [PATCH] build: enable frontend source maps Currently, frontend stack traces are unhelpful in production builds, because they only include minified code. By enabling source maps for production builds, we enhance debuggability and error-reports. Ref: https://nextjs.org/docs/advanced-features/source-maps Signed-off-by: David Mehren --- frontend/next.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/next.config.js b/frontend/next.config.js index 546c5a13d..8aed11b9c 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -90,7 +90,8 @@ const rawNextConfig = { swcMinify: false, //Otherwise emoji picker is minified incorrectly experimental: { outputFileTracingRoot: path.join(__dirname, '../') - } + }, + productionBrowserSourceMaps: true } const completeNextConfig = withBundleAnalyzer(rawNextConfig)