Skip to content

Commit

Permalink
Sentry example: add js types to SentryWebpackPluginOptions (#28726)
Browse files Browse the repository at this point in the history
* Add js types to SentryWebpackPluginOptions

Enables code completion in Visual Studio Code (and perhaps other editors)

* Use partial type for SentryWebpackPluginOptions

This matches the expected type in https://github.com/getsentry/sentry-javascript/blob/e71454ef781563e36c727315d1a5b59acb9e2e0a/packages/nextjs/src/config/webpack.ts#L38

* inline sentry config
  • Loading branch information
jonespen committed Feb 21, 2022
1 parent dc20805 commit 31d8385
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/with-sentry/next.config.js
Expand Up @@ -9,16 +9,14 @@ const moduleExports = {
// Your existing module.exports
}

const sentryWebpackPluginOptions = {
// Make sure adding Sentry options is the last code to run before exporting, to
// ensure that your source maps include changes from all other Webpack plugins
module.exports = withSentryConfig(moduleExports, {
// Additional config options for the Sentry Webpack plugin. Keep in mind that
// the following options are set automatically, and overriding them is not
// recommended:
// release, url, org, project, authToken, configFile, stripPrefix,
// urlPrefix, include, ignore
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options.
}

// Make sure adding Sentry options is the last code to run before exporting, to
// ensure that your source maps include changes from all other Webpack plugins
module.exports = withSentryConfig(moduleExports, sentryWebpackPluginOptions)
})

0 comments on commit 31d8385

Please sign in to comment.