Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Fix sourcemaps association #1630

Merged
merged 2 commits into from
Feb 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions packages/shared/next/next.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,23 @@ const nextConfig = {
},
};

const sentryWebpackPluginOptions = {};
const sentryWebpackPluginOptions = {
// The same release value needs to be used both:
// 1. here to create a new release on Sentry and upload sourcemaps to it,
// 2. and when initializing Sentry in the browser (`Sentry.init`).
release: gitSHA,
};

// withSentryConfig extends the default Next.js usage of webpack to:
//
// 1. Initialize the SDK on client page load (See `sentry.client.config.ts`)
//
// 2. Upload sourcemaps, using the settings defined in `sentry.properties`.
// Sourcemaps are only uploaded if SENTRY_AUTH_TOKEN is defined.
//
// Sourcemaps are only uploaded to Sentry if SENTRY_AUTH_TOKEN is defined. Note
// that sourcemaps are always generated in the static export; the Sentry Webpack
// plugin behavies as if the `productionBrowserSourceMaps` Next.js configuration
// setting is `true`.
//
// Irritatingly, Sentry insists that we create empty sentry.server.config.ts and
// sentry.edge.config.ts files, even though we are not using those parts.
Expand Down
Loading