-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(nextjs): Add options to disable webpack plugin #3771
feat(nextjs): Add options to disable webpack plugin #3771
Conversation
size-limit report
|
@@ -261,4 +261,43 @@ describe('Sentry webpack plugin config', () => { | |||
it("merges default include and ignore/ignoreFile options with user's values", () => { | |||
// do we even want to do this? | |||
}); | |||
|
|||
it('allows SentryWebpackPlugin to be turned off for client code (independent of server code)', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taking some time to think about this, the tests for constructWebpackConfigFunction
should just be a table test, where we pass in different permutations of the config and assert on the return value. We can do this in another PR though.
54e8cd5
to
f7460d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: We need to add a task to add this new option to the docs.
Precisely why It's still in draft mode! 🙂
|
Add docs for the options introduced in getsentry/sentry-javascript#3771, which allow the user to disable the addition of `SentryWebpackPlugin` to server and client builds.
Despite our strong encouragement, not everyone wants to use the
SentryWebpackPlugin
to upload sourcemaps. This PR introduces two new options,disableServerWebpackPlugin
anddisableClientWebpackPlugin
, which can be used innext.config.js
like this:Setting either of these options does two things in the relevant (server or client) config:
webpack.devtool
to besource-map
in production, andSentryWebpackPlugin
to the webpack config.These changes are documented in getsentry/sentry-docs#3826.
Fixes #3674
Fixes #3513
Fixes #3553
Fixes #3737