Skip to content

Commit 559e1ca

Browse files
authored
build(ui): Only annotate react components in production (#92063)
1 parent b4db321 commit 559e1ca

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rspack.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,8 @@ appConfig.plugins?.push(
784784
create: false,
785785
},
786786
reactComponentAnnotation: {
787-
enabled: true,
787+
// Enabled only in production because annotating is slow
788+
enabled: IS_PRODUCTION,
788789
},
789790
bundleSizeOptimizations: {
790791
// This is enabled so that our SDKs send exceptions to Sentry

webpack.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,8 @@ appConfig.plugins?.push(
823823
create: false,
824824
},
825825
reactComponentAnnotation: {
826-
enabled: true,
826+
// Enabled only in production because annotating is slow
827+
enabled: IS_PRODUCTION,
827828
},
828829
bundleSizeOptimizations: {
829830
// This is enabled so that our SDKs send exceptions to Sentry

0 commit comments

Comments
 (0)