Skip to content

Commit 5229217

Browse files
authored
fix(nextjs): Update argument name in log message about sentry property on Next.js config object (#12366)
1 parent 7de5ea4 commit 5229217

File tree

2 files changed

+2
-38
lines changed

2 files changed

+2
-38
lines changed
Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,3 @@
1-
// This file sets a custom webpack configuration to use your Next.js app
2-
// with Sentry.
3-
// https://nextjs.org/docs/api-reference/next.config.js/introduction
4-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
5-
61
const { withSentryConfig } = require('@sentry/nextjs');
72

8-
const moduleExports = {
9-
// Your existing module.exports
10-
11-
sentry: {
12-
// Use `hidden-source-map` rather than `source-map` as the Webpack `devtool`
13-
// for client-side builds. (This will be the default starting in
14-
// `@sentry/nextjs` version 8.0.0.) See
15-
// https://webpack.js.org/configuration/devtool/ and
16-
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map
17-
// for more information.
18-
hideSourceMaps: true,
19-
},
20-
};
21-
22-
const sentryWebpackPluginOptions = {
23-
// Additional config options for the Sentry Webpack plugin. Keep in mind that
24-
// the following options are set automatically, and overriding them is not
25-
// recommended:
26-
// release, url, org, project, authToken, configFile, stripPrefix,
27-
// urlPrefix, include, ignore
28-
29-
silent: true, // Suppresses all logs
30-
// For all available options, see:
31-
// https://github.com/getsentry/sentry-webpack-plugin#options.
32-
33-
// We're not testing source map uploads at the moment.
34-
dryRun: true,
35-
};
36-
37-
// Make sure adding Sentry options is the last code to run before exporting, to
38-
// ensure that your source maps include changes from all other Webpack plugins
39-
module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions);
3+
module.exports = withSentryConfig();

packages/nextjs/src/config/withSentryConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function getFinalConfigObject(
5151
if ('sentry' in incomingUserNextConfigObject) {
5252
// eslint-disable-next-line no-console
5353
console.warn(
54-
'[@sentry/nextjs] Setting a `sentry` property on the Next.js config is no longer supported. Please use the `sentrySDKOptions` argument of `withSentryConfig` instead.',
54+
'[@sentry/nextjs] Setting a `sentry` property on the Next.js config object as a means of configuration is no longer supported. Please use the `sentryBuildOptions` argument of of the `withSentryConfig()` function instead.',
5555
);
5656

5757
// Next 12.2.3+ warns about non-canonical properties on `userNextConfig`.

0 commit comments

Comments
 (0)