-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(nextjs)!: Remove unstable_sentryWebpackPluginOptions #23372
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
Merged
chargome
merged 1 commit into
charlygomez/js-3358-astro-remove-unstable_sentryvitepluginoptions
from
charlygomez/js-3359-nextjs-remove-unstable_sentrywebpackpluginoptions
Aug 13, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| import type { GLOBAL_OBJ } from '@sentry/core'; | ||
| import type { SentryWebpackPluginOptions } from '@sentry/bundler-plugins/webpack'; | ||
| import type { | ||
| GLOBAL_OBJ, | ||
| ModuleMetadata, | ||
| ModuleMetadataCallback, | ||
| ReactComponentAnnotationOptions, | ||
| ResolveSourceMapHook, | ||
| } from '@sentry/core'; | ||
|
|
||
| // The first argument to `withSentryConfig` (which is the user's next config). | ||
| export type ExportedNextConfig = NextConfigObject | NextConfigFunction; | ||
|
|
@@ -146,14 +151,6 @@ export type SentryBuildWebpackOptions = { | |
| excludeReplayCompressionWorker?: boolean; | ||
| }; | ||
|
|
||
| /** | ||
| * Options to be passed directly to the Sentry Webpack Plugin (`@sentry/bundler-plugins/webpack`) that ships with the Sentry SDK. | ||
| * You can use this option to override any options the SDK passes to the Webpack plugin. | ||
| * | ||
| * Please note that this option is unstable and may change in a breaking way in any release. | ||
| */ | ||
| unstable_sentryWebpackPluginOptions?: SentryWebpackPluginOptions; | ||
|
|
||
| /** | ||
| * Options related to react component name annotations. | ||
| * Disabled by default, unless a value is set for this option. | ||
|
|
@@ -163,21 +160,7 @@ export type SentryBuildWebpackOptions = { | |
| * | ||
| * @deprecated Use the top-level `reactComponentAnnotation` option instead, which works for both webpack and Turbopack builds. | ||
| */ | ||
| reactComponentAnnotation?: { | ||
| /** | ||
| * Whether the component name annotate plugin should be enabled or not. | ||
| * | ||
| * @deprecated Use the top-level `reactComponentAnnotation` option instead, which works for both webpack and Turbopack builds. | ||
| */ | ||
| enabled?: boolean; | ||
|
|
||
| /** | ||
| * A list of strings representing the names of components to ignore. The plugin will not apply `data-sentry` annotations on the DOM element for these components. | ||
| * | ||
| * @deprecated Use the top-level `reactComponentAnnotation` option instead, which works for both webpack and Turbopack builds. | ||
| */ | ||
| ignoredComponents?: string[]; | ||
| }; // TODO(v12): remove this option | ||
| reactComponentAnnotation?: ReactComponentAnnotationOptions; // TODO(v12): remove this option | ||
| }; | ||
|
|
||
| export type SentryBuildOptions = { | ||
|
|
@@ -317,6 +300,16 @@ export type SentryBuildOptions = { | |
| */ | ||
| // oxlint-disable-next-line typescript-eslint/no-explicit-any -- matches the bundler plugin's RewriteSourcesHook type | ||
| rewriteSources?: (source: string, map: any, context?: { mapDir: string }) => string; | ||
|
|
||
| /** | ||
| * Hook to customize source map file resolution. | ||
| * | ||
| * Mostly helpful for complex builds with custom source map generation. For example, if source maps | ||
| * are written to a separate directory and the `//# sourceMappingURL=` comment is rewritten to | ||
| * something other than a relative path, Sentry is unable to locate the source map for a given | ||
| * build artifact. This hook lets you implement the resolution process yourself. | ||
| */ | ||
| resolveSourceMap?: ResolveSourceMapHook; | ||
| }; | ||
|
|
||
| /** | ||
|
|
@@ -503,17 +496,20 @@ export type SentryBuildOptions = { | |
| * For webpack builds, this is forwarded to `@sentry/bundler-plugins/webpack`. | ||
| * For Turbopack builds, this applies the annotations via a custom loader and requires Next.js 16+. | ||
| */ | ||
| reactComponentAnnotation?: { | ||
| /** | ||
| * Whether the component name annotate plugin should be enabled or not. | ||
| */ | ||
| enabled?: boolean; | ||
| reactComponentAnnotation?: ReactComponentAnnotationOptions; | ||
|
|
||
| /** | ||
| * A list of strings representing the names of components to ignore. The plugin will not apply `data-sentry` annotations on the DOM element for these components. | ||
| */ | ||
| ignoredComponents?: string[]; | ||
| }; | ||
| /** | ||
| * Metadata that should be associated with the built application. | ||
| * | ||
| * The metadata is serialized and can be looked up at runtime from within the SDK (for example in | ||
| * `beforeSend`, event processors, or the transport), allowing for custom event filtering logic or | ||
| * routing of events. Read it at runtime via `moduleMetadataIntegration`. | ||
| * | ||
| * Note: This currently only applies to webpack builds. On Turbopack builds it has no effect and | ||
| * the SDK warns at build time. For `thirdPartyErrorFilterIntegration` support use | ||
| * `applicationKey`, which works on both bundlers. | ||
| */ | ||
| moduleMetadata?: ModuleMetadata | ModuleMetadataCallback; | ||
|
chargome marked this conversation as resolved.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. q: same for this one
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same for this, we only have applicationKey, which calls this behind the scenes but we'll make it available top level |
||
|
|
||
| /** | ||
| * Options to configure various bundle size optimizations related to the Sentry SDK. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
q: why do we have this new option now?
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.
this was not hoisted before, we'll move nextjs to the shared type