Skip to content

Commit 49a5af4

Browse files
authored
fix(nextjs): Use lower camel case for webpack plugin options object (#4621)
It's not a class or an interface, so no reason it should be capitalized.
1 parent 9f49ab5 commit 49a5af4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/platforms/javascript/guides/nextjs/manual-setup.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const moduleExports = {
163163
// your existing module.exports
164164
};
165165

166-
const SentryWebpackPluginOptions = {
166+
const sentryWebpackPluginOptions = {
167167
// Additional config options for the Sentry Webpack plugin. Keep in mind that
168168
// the following options are set automatically, and overriding them is not
169169
// recommended:
@@ -177,7 +177,7 @@ const SentryWebpackPluginOptions = {
177177

178178
// Make sure adding Sentry options is the last code to run before exporting, to
179179
// ensure that your source maps include changes from all other Webpack plugins
180-
module.exports = withSentryConfig(moduleExports, SentryWebpackPluginOptions);
180+
module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions);
181181
```
182182

183183
<Alert level="warning" title="Serverless Environments">
@@ -192,7 +192,7 @@ Make sure to add the Sentry config last; otherwise, the source maps the plugin r
192192

193193
By default, `withSentryConfig` will add an instance of `SentryWebpackPlugin` to the webpack plugins, for both server and client builds. This means that when you run a production build (`next build`), `sentry-cli` will automatically detect and upload your source files, source maps, and bundles to Sentry, so that your stacktraces can be demangled. (This behavior is disabled when running the dev server (`next dev`), because otherwise the full upload process would reoccur on each file change.)
194194

195-
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).
195+
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).
196196

197197
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:
198198

@@ -205,7 +205,7 @@ const moduleExports = {
205205
};
206206
```
207207

208-
If you disable the plugin for both server and client builds, it's safe to omit the `SentryWebpackPluginOptions` parameter from your `withSentryConfig` call:
208+
If you disable the plugin for both server and client builds, it's safe to omit the `sentryWebpackPluginOptions` parameter from your `withSentryConfig` call:
209209

210210
```javascript {filename:next.config.js}
211211
module.exports = withSentryConfig(moduleExports);

0 commit comments

Comments
 (0)