|
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 | | - |
6 | 1 | const { withSentryConfig } = require('@sentry/nextjs'); |
7 | 2 |
|
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(); |
0 commit comments