From 2c8caa5f6085fa67c7092f84eee23f5fa7e09b2c Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Mon, 29 Aug 2022 16:25:23 -0700 Subject: [PATCH] add note about upcoming default value --- src/platforms/javascript/guides/nextjs/manual-setup.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platforms/javascript/guides/nextjs/manual-setup.mdx b/src/platforms/javascript/guides/nextjs/manual-setup.mdx index ef16670a20dda..ac1878172d557 100644 --- a/src/platforms/javascript/guides/nextjs/manual-setup.mdx +++ b/src/platforms/javascript/guides/nextjs/manual-setup.mdx @@ -244,9 +244,9 @@ In that case you can also skip the `sentry-cli` configuration step below. ### Use `hidden-source-map` -_(New in version 6.17.1)_ +_(New in version 6.17.1, will default to `true` in 8.0.0 and beyond.)_ -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`: +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 `moduleExports` above, and set the `hideSourceMaps` option to `true`: ```javascript {filename:next.config.js} const moduleExports = { @@ -256,7 +256,7 @@ const moduleExports = { }; ``` -Note that this only applies to client-side builds, and requires the `SentryWebpackPlugin` to be enabled. +Note that this only applies to client-side builds, and requires the `SentryWebpackPlugin` to be enabled. This option will default to `true` starting in version 8.0.0. See https://webpack.js.org/configuration/devtool/ for more information. ### Widen the Upload Scope