Skip to content

Commit 4f81cfb

Browse files
committed
build: enable source maps in prod
1 parent 89389df commit 4f81cfb

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

next.config.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ let nextConfig: NextConfig = {
3737
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
3838
basePath: process.env.NEXT_PUBLIC_BASE_PATH || undefined,
3939
transpilePackages: MONOREPO_MODE ? ["@squonk/mui-theme", "@squonk/sdf-parser"] : [],
40+
// Enable production source maps for Sentry error reporting
41+
productionBrowserSourceMaps: true,
4042
// Allow mdx content and mdx files as pages
4143
webpack(config, options) {
4244
if (options.isServer) {
@@ -55,22 +57,17 @@ let nextConfig: NextConfig = {
5557

5658
nextConfig = withMDX(nextConfig);
5759
nextConfig = withRoutes(nextConfig);
58-
nextConfig = withSentryConfig(
59-
nextConfig,
60-
{
61-
// Suppresses source map uploading logs during build
62-
silent: true,
63-
org: "informatics-matters",
64-
project: "data-manager-ui",
60+
nextConfig = withSentryConfig(nextConfig, {
61+
// Suppresses source map uploading logs during build
62+
silent: true,
63+
org: "informatics-matters",
64+
project: "data-manager-ui",
6565

66-
// Automatically delete source maps after uploading them to Sentry
67-
sourcemaps: {
68-
deleteSourcemapsAfterUpload: true,
69-
},
66+
// Automatically delete source maps after uploading them to Sentry
67+
sourcemaps: { deleteSourcemapsAfterUpload: true },
7068

71-
// Hides source maps from generated client bundles
72-
hideSourceMaps: true,
73-
},
74-
);
69+
// Hides source maps from generated client bundles
70+
hideSourceMaps: true,
71+
});
7572

7673
export default nextConfig;

0 commit comments

Comments
 (0)