diff --git a/src/platforms/javascript/guides/nextjs/manual-setup.mdx b/src/platforms/javascript/guides/nextjs/manual-setup.mdx index c18cf69c0066f..0fabeb1298ff9 100644 --- a/src/platforms/javascript/guides/nextjs/manual-setup.mdx +++ b/src/platforms/javascript/guides/nextjs/manual-setup.mdx @@ -217,7 +217,6 @@ 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 `source-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`: @@ -232,6 +231,22 @@ const moduleExports = { Note that this only applies to client-side builds, and requires the `SentryWebpackPlugin` to be enabled. +### Widen the Upload Scope + +_(New in version 6.19.1)_ + +If you find that there are in-app frames in your client-side stack traces that aren't getting source-mapped even when most others are, it's likely because they 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, and are named in such a way that it's hard to distinguish between relevant files (ones containing your code) and irrelevant ones. + +To upload all of the files in `static/chunks/` anyway, add a `sentry` object to `moduleExports` above, and set the `widenClientFileUpload` option to `true`: + +```javascript {filename:next.config.js} +const moduleExports = { + sentry: { + widenClientFileUpload: true, + }, +}; +``` + ## 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/).