Skip to content
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
19 changes: 19 additions & 0 deletions src/platforms/javascript/guides/nextjs/manual-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ By default, `withSentryConfig` will add an instance of `SentryWebpackPlugin` to

To configure the plugin, pass a `SentryWebpackPluginOptions` argument to `withSentryConfig`, as seen in the example above. All available options are documented [here](https://github.com/getsentry/sentry-webpack-plugin#options).

### Disable `SentryWebpackPlugin`

If you want or need to handle source map uploading separately, the plugin can be disabled for either the server or client build process. To do this, add a `sentry` object to `moduleExports` above, and set the relevant options there:

```javascript {filename:next.config.js}
Expand All @@ -213,6 +215,23 @@ module.exports = withSentryConfig(moduleExports);

In that case you can also skip the `sentry-cli` configuration step below.

### Use `hidden-source-map`


_(New in version 6.17.1)_

If you would like to use `hidden-source-map` rather than `souce-map` as your webpack `devtool`, so that your built files do not contain a `sourceMappingURL` comment, add a `sentry` object to `moduleExports` above, and set the `hideSourceMaps` option to `true`:

```javascript {filename:next.config.js}
const moduleExports = {
sentry: {
hideSourceMaps: true,
},
};
```

Note that this only applies to client-side builds.

## Configure `sentry-cli`

The `SentryWebpackPlugin` uses `sentry-cli` to manage releases and source maps, which can be configured in one of two ways - using configuration files, or with environment variables - both of which are discussed below. For full details, see [the CLI configuration docs](/product/cli/configuration/).
Expand Down