File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
packages/bundler-plugin-core/src Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ export function sentryUnpluginFactory({
438438 if ( options . reactComponentAnnotation ) {
439439 if ( ! options . reactComponentAnnotation . enabled ) {
440440 logger . debug (
441- "The component name annotate plugin is currently disabled. Skipping component name annotations."
441+ "The component name annotate plugin is disabled. Skipping component name annotations."
442442 ) ;
443443 } else if ( options . reactComponentAnnotation . enabled && ! componentNameAnnotatePlugin ) {
444444 logger . warn (
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ export type NormalizedOptions = ReturnType<typeof normalizeUserOptions>;
66
77export const SENTRY_SAAS_URL = "https://sentry.io" ;
88
9+ const DEFAULT_IGNORED_REACT_COMPONENTS = [ "Fragment" ] ;
10+
911export function normalizeUserOptions ( userOptions : UserOptions ) {
1012 const options = {
1113 org : userOptions . org ?? process . env [ "SENTRY_ORG" ] ,
@@ -28,7 +30,17 @@ export function normalizeUserOptions(userOptions: UserOptions) {
2830 vcsRemote : userOptions . release ?. vcsRemote ?? process . env [ "SENTRY_VSC_REMOTE" ] ?? "origin" ,
2931 } ,
3032 bundleSizeOptimizations : userOptions . bundleSizeOptimizations ,
31- reactComponentAnnotation : userOptions . reactComponentAnnotation ,
33+ reactComponentAnnotation : userOptions . reactComponentAnnotation
34+ ? {
35+ enabled : userOptions . reactComponentAnnotation ?. enabled ?? false ,
36+ ignoredComponents : [
37+ ...new Set ( [
38+ ...( userOptions . reactComponentAnnotation ?. ignoredComponents ?? [ ] ) ,
39+ ...DEFAULT_IGNORED_REACT_COMPONENTS ,
40+ ] ) ,
41+ ] ,
42+ }
43+ : undefined ,
3244 _metaOptions : {
3345 telemetry : {
3446 metaFramework : userOptions . _metaOptions ?. telemetry ?. metaFramework ,
You can’t perform that action at this time.
0 commit comments