You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`withSentryConfig` uses a [custom Webpack plugin](https://www.npmjs.com/package/@sentry/webpack-plugin) to manage your sourcemaps and releases under the hood. If `withSentryConfig` does not provide the option you need to modify, you may override the `sentryWebpackPluginOptions` directly via `unstable_sentryWebpackPluginOptions`.
71
72
72
73
<Alertlevel="warning">
73
-
Note that this option is unstable and its API may include breaking changes in any release.
74
+
Note that this option is unstable and its API may include breaking changes in
75
+
any release.
74
76
</Alert>
75
77
76
-
77
78
## Create Initialization Config Files
78
79
79
80
Create three files in the root directory of your Next.js application: `sentry.client.config.js`, `sentry.server.config.js` and `sentry.edge.config.js`. In these files, add your initialization code for the client-side SDK and server-side SDK, respectively. We've included some examples below.
@@ -175,7 +176,6 @@ export async function register() {
175
176
}
176
177
```
177
178
178
-
179
179
Make sure that the `import` statements point to your newly created `sentry.server.config.(js|ts)` and `sentry.edge.config.(js|ts)` files.
180
180
181
181
## Report React Component Render Errors
@@ -457,60 +457,6 @@ Do not commit your auth token to version control.
457
457
SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
458
458
```
459
459
460
-
### Disable Source Maps
461
-
462
-
You can disable the custom sourcemap plugin as follows:
Depending on your deployment setup, adding `sentry/nextjs` to your app may cause your source code to be visible in browser devtools when it wasn't before. (This happens because of the default behavior of [webpack's `source-map` built-in `devtool`](https://webpack.js.org/configuration/devtool/).) To prevent this, you can use `hidden-source-map` rather than `source-map`, which will prevent your built files from containing a `sourceMappingURL` comment, thus making sourcemaps invisible to the browser. To use `hidden-source-map`, add a `sentry` object to `nextConfig` above, and set the `hideSourceMaps` option to `true`:
If you find that there are some frames in your client-side stack traces that aren't getting source-mapped even when most others are, the issue might be that those frames are from files in `static/chunks/` rather than `static/chunks/pages/`. By default, such files aren't uploaded because the majority of the files in `static/chunks/` only contain Next.js or third-party code.
499
-
500
-
To upload all of the files and source maps, including ones from third-party packages, set the `widenClientFileUpload` option to `true`:
`@sentry/nextjs` will generate and upload source maps automatically, in order to enable errors to have readable stack traces.
2
2
3
-
To upload source maps, the `@sentry/nextjs` SDK uses the [Sentry webpack plugin](https://www.npmjs.com/package/@sentry/webpack-plugin) under the hood. See the [Manual Configuration](../manual-setup/#configure-source-maps) page and the Sentry [webpack plugin documentation](https://www.npmjs.com/package/@sentry/webpack-plugin) for more details. If you are using Vercel, then you can also use the [Vercel integration](/organization/integrations/deployment/vercel/) to upload source maps during deployments automatically.
3
+
To upload source maps, the `@sentry/nextjs` SDK uses the Sentry webpack plugin under the hood. See the [Build Options](../configuration/build/#source-maps-options) page and the Sentry [webpack plugin documentation](https://www.npmjs.com/package/@sentry/webpack-plugin) for more details. If you are using Vercel, then you can also use the [Vercel integration](/organization/integrations/deployment/vercel/) to upload source maps during deployments automatically.
0 commit comments