diff --git a/src/platforms/javascript/guides/nextjs/manual-setup.mdx b/src/platforms/javascript/guides/nextjs/manual-setup.mdx index 6d12d6c188327..efd5d6304f324 100644 --- a/src/platforms/javascript/guides/nextjs/manual-setup.mdx +++ b/src/platforms/javascript/guides/nextjs/manual-setup.mdx @@ -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} @@ -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/).