Skip to content

Commit 67dafe4

Browse files
committed
build(sentry): delete source maps after upload and hide from client bundles
1 parent 9fd1761 commit 67dafe4

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

next.config.ts

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,22 @@ const withBundleAnalyser = bundleAnalyze({
6161
nextConfig = withBundleAnalyser(nextConfig);
6262
nextConfig = withMDX(nextConfig);
6363
nextConfig = withRoutes(nextConfig);
64-
nextConfig = withSentryConfig(nextConfig, {
65-
// For all available options, see:
66-
// https://github.com/getsentry/sentry-webpack-plugin#options
64+
nextConfig = withSentryConfig(
65+
nextConfig,
66+
{
67+
// Suppresses source map uploading logs during build
68+
silent: true,
69+
org: "informatics-matters",
70+
project: "data-manager-ui",
6771

68-
// Suppresses source map uploading logs during build
69-
silent: true,
70-
org: "informatics-matters",
71-
project: "data-manager-ui",
72-
});
72+
// Automatically delete source maps after uploading them to Sentry
73+
sourcemaps: {
74+
deleteSourcemapsAfterUpload: true,
75+
},
76+
77+
// Hides source maps from generated client bundles
78+
hideSourceMaps: true,
79+
},
80+
);
7381

7482
export default nextConfig;

0 commit comments

Comments
 (0)