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 <git@herrmehren.de>
This commit is contained in:
David Mehren 2023-03-19 18:25:00 +01:00 committed by Tilman Vatteroth
parent 45638b7456
commit fe3ed17610

View file

@ -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)