Skip to content

Ability to disable SentryWebpackPlugin with @sentry/nextjs v8 #12152

Description

@seanparmelee

Problem Statement

With @sentry/nextjs v7, we were using disableServerWebpackPlugin and disableClientWebpackPlugin to disable the plugin in certain cases when we want a production build, but don't want to create a release & upload source maps (such as wanting to test prod mode locally or temporarily deploy a PR build to an ephemeral instance).

I was trying to find similar functionality in v8 and it seems unstable_sentryWebpackPluginOptions.disable does the trick, but the "unstable" part sounds scary and has me wondering if there's another way to accomplish this. Or maybe the disable is safe enough and could be surfaced as an option under SentryBuildOptions?

Solution Brainstorm

Assuming it's safe to do, maybe the disable option could be surfaced as a top-level option called something like disableWebpackPlugin? Happy to submit a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions