Skip to content

Commit 7ed29b9

Browse files
authored
deps:bump swc-annotate-plugin to 1.8.0 (#96453)
Bump swc-annotate-plugin to 1.8.0
1 parent 9135f11 commit 7ed29b9

File tree

3 files changed

+80
-36
lines changed

3 files changed

+80
-36
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
"scroll-to-element": "^2.0.0",
171171
"sprintf-js": "1.0.3",
172172
"style-loader": "4.0.0",
173-
"swc-plugin-component-annotate": "1.5.0",
173+
"swc-plugin-component-annotate": "1.8.0",
174174
"ts-checker-rspack-plugin": "1.1.4",
175175
"tslib": "^2.8.1",
176176
"typescript": "^5.8.3",

pnpm-lock.yaml

Lines changed: 63 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rspack.config.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,22 @@ const swcReactLoaderConfig: SwcLoaderOptions = {
205205
],
206206
[
207207
'swc-plugin-component-annotate',
208-
{
209-
'annotate-fragments': false,
210-
'component-attr': 'data-sentry-component',
211-
'element-attr': 'data-sentry-element',
212-
'source-file-attr': 'data-sentry-source-file',
213-
},
208+
Object.assign(
209+
{},
210+
{
211+
'annotate-fragments': false,
212+
'component-attr': 'data-sentry-component',
213+
'element-attr': 'data-sentry-element',
214+
'source-file-attr': 'data-sentry-source-file',
215+
},
216+
// We don't want to add source path attributes in production
217+
// as it will unnecessarily bloat the bundle size
218+
IS_PRODUCTION
219+
? {}
220+
: {
221+
'source-path-attr': 'data-sentry-source-path',
222+
}
223+
),
214224
],
215225
],
216226
},

0 commit comments

Comments
 (0)