@sentry/webpack-plugin 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -31
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -120,10 +120,13 @@ This value can also be specified via the `SENTRY_PROJECT` environment variable.
|
|
|
120
120
|
|
|
121
121
|
Type: `string`
|
|
122
122
|
|
|
123
|
-
The authentication token to use for all communication with Sentry.
|
|
123
|
+
The authentication token to use for all communication with Sentry.
|
|
124
|
+
Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.
|
|
124
125
|
|
|
125
126
|
This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
|
|
126
127
|
|
|
128
|
+
Check out the docs on organization tokens: https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
|
|
129
|
+
|
|
127
130
|
### `url`
|
|
128
131
|
|
|
129
132
|
Type: `string`
|
|
@@ -138,19 +141,19 @@ Defaults to https://sentry.io/, which is the correct value for SaaS customers.
|
|
|
138
141
|
|
|
139
142
|
Type: `Record<string, string>`
|
|
140
143
|
|
|
141
|
-
|
|
144
|
+
Additional headers to send with every outgoing request to Sentry.
|
|
142
145
|
|
|
143
146
|
### `debug`
|
|
144
147
|
|
|
145
148
|
Type: `boolean`
|
|
146
149
|
|
|
147
|
-
|
|
150
|
+
Enable debug information logs during build-time. Enabling this will give you, for example, logs about source maps. Defaults to `false`.
|
|
148
151
|
|
|
149
152
|
### `silent`
|
|
150
153
|
|
|
151
154
|
Type: `boolean`
|
|
152
155
|
|
|
153
|
-
Suppresses all logs. Defaults to `false`.
|
|
156
|
+
Suppresses all build logs (all log levels, including errors). Defaults to `false`.
|
|
154
157
|
|
|
155
158
|
### `errorHandler`
|
|
156
159
|
|
|
@@ -173,9 +176,9 @@ errorHandler: (err) => {
|
|
|
173
176
|
|
|
174
177
|
Type: `boolean`
|
|
175
178
|
|
|
176
|
-
If
|
|
179
|
+
If this flag is `true`, internal plugin errors and performance data will be sent to Sentry. It will not collect any sensitive or user-specific data.
|
|
177
180
|
|
|
178
|
-
At Sentry we like to use Sentry ourselves to deliver faster and more stable products. We're very careful of what we're sending. We won't collect anything other than error and high-level performance data. We will never collect your code or any details of the projects in which you're using this plugin.
|
|
181
|
+
At Sentry, we like to use Sentry ourselves to deliver faster and more stable products. We're very careful of what we're sending. We won't collect anything other than error and high-level performance data. We will never collect your code or any details of the projects in which you're using this plugin.
|
|
179
182
|
|
|
180
183
|
Defaults to `true`.
|
|
181
184
|
|
|
@@ -189,16 +192,16 @@ Completely disables all functionality of the plugin. Defaults to `false`.
|
|
|
189
192
|
|
|
190
193
|
|
|
191
194
|
|
|
192
|
-
Options
|
|
195
|
+
Options related to source maps upload and processing.
|
|
193
196
|
### `sourcemaps.assets`
|
|
194
197
|
|
|
195
198
|
Type: `string | string[]`
|
|
196
199
|
|
|
197
|
-
A glob or an array of globs that
|
|
200
|
+
A glob or an array of globs that specify the build artifacts and source maps that will be uploaded to Sentry.
|
|
198
201
|
|
|
199
|
-
|
|
202
|
+
The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
|
|
200
203
|
|
|
201
|
-
|
|
204
|
+
If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
|
|
202
205
|
|
|
203
206
|
Use the `debug` option to print information about which files end up being uploaded.
|
|
204
207
|
|
|
@@ -208,12 +211,12 @@ Type: `string | string[]`
|
|
|
208
211
|
|
|
209
212
|
A glob or an array of globs that specifies which build artifacts should not be uploaded to Sentry.
|
|
210
213
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
|
|
214
|
+
The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
|
|
214
215
|
|
|
215
216
|
Use the `debug` option to print information about which files end up being uploaded.
|
|
216
217
|
|
|
218
|
+
Default: `[]`
|
|
219
|
+
|
|
217
220
|
### `sourcemaps.rewriteSources`
|
|
218
221
|
|
|
219
222
|
Type: `(source: string, map: any) => string`
|
|
@@ -251,7 +254,9 @@ Type: `string | string[] | Promise<string | string[]>`
|
|
|
251
254
|
|
|
252
255
|
A glob, an array of globs or a promise resolving a glob or array of globs that specifies the build artifacts that should be deleted after the artifact upload to Sentry has been completed.
|
|
253
256
|
|
|
254
|
-
|
|
257
|
+
Note: If you pass in a Promise that resolves to a string or array, the plugin will await the Promise and use the resolved value globs. This is useful if you need to dynamically determine the files to delete. Some higher-level Sentry SDKs or options use this feature (e.g., SvelteKit).
|
|
258
|
+
|
|
259
|
+
The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
|
|
255
260
|
|
|
256
261
|
Use the `debug` option to print information about which files end up being deleted.
|
|
257
262
|
|
|
@@ -259,7 +264,7 @@ Use the `debug` option to print information about which files end up being delet
|
|
|
259
264
|
|
|
260
265
|
Type: `boolean`
|
|
261
266
|
|
|
262
|
-
|
|
267
|
+
If this flag is `true`, any functionality related to source maps will be disabled.
|
|
263
268
|
|
|
264
269
|
Defaults to `false`.
|
|
265
270
|
|
|
@@ -278,9 +283,9 @@ Unique identifier for the release you want to create.
|
|
|
278
283
|
|
|
279
284
|
This value can also be specified via the `SENTRY_RELEASE` environment variable.
|
|
280
285
|
|
|
281
|
-
Defaults to automatically detecting a value for your environment. This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA
|
|
286
|
+
Defaults to automatically detecting a value for your environment. This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA (the latter requires access to git CLI and for the root directory to be a valid repository).
|
|
282
287
|
|
|
283
|
-
If
|
|
288
|
+
If no `name` is provided and the plugin can't automatically detect one, no release will be created.
|
|
284
289
|
|
|
285
290
|
### `release.inject`
|
|
286
291
|
|
|
@@ -294,7 +299,9 @@ Defaults to `true`.
|
|
|
294
299
|
|
|
295
300
|
Type: `boolean`
|
|
296
301
|
|
|
297
|
-
Whether the plugin should create a release on Sentry during the build.
|
|
302
|
+
Whether the plugin should create a release on Sentry during the build.
|
|
303
|
+
|
|
304
|
+
Note that a release may still appear in Sentry even if this is value is `false` because any Sentry event that has a release value attached will automatically create a release. (for example via the `inject` option)
|
|
298
305
|
|
|
299
306
|
Defaults to `true`.
|
|
300
307
|
|
|
@@ -302,7 +309,7 @@ Defaults to `true`.
|
|
|
302
309
|
|
|
303
310
|
Type: `boolean`
|
|
304
311
|
|
|
305
|
-
Whether the
|
|
312
|
+
Whether to automatically finalize the release. The release is finalized by adding an end timestamp after the build ends.
|
|
306
313
|
|
|
307
314
|
Defaults to `true`.
|
|
308
315
|
|
|
@@ -310,13 +317,15 @@ Defaults to `true`.
|
|
|
310
317
|
|
|
311
318
|
Type: `string`
|
|
312
319
|
|
|
313
|
-
Unique identifier for the
|
|
320
|
+
Unique distribution identifier for the release. Used to further segment the release.
|
|
321
|
+
|
|
322
|
+
Usually your build number.
|
|
314
323
|
|
|
315
324
|
### `release.vcsRemote`
|
|
316
325
|
|
|
317
326
|
Type: `string`
|
|
318
327
|
|
|
319
|
-
Version control system remote name.
|
|
328
|
+
Version control system (VCS) remote name.
|
|
320
329
|
|
|
321
330
|
This value can also be specified via the `SENTRY_VSC_REMOTE` environment variable.
|
|
322
331
|
|
|
@@ -326,7 +335,11 @@ Defaults to 'origin'.
|
|
|
326
335
|
|
|
327
336
|
|
|
328
337
|
|
|
329
|
-
|
|
338
|
+
Configuration for associating the release with its commits in Sentry.
|
|
339
|
+
|
|
340
|
+
Set to `false` to disable commit association.
|
|
341
|
+
|
|
342
|
+
Defaults to `{ auto: true }`.
|
|
330
343
|
### `release.setCommits.previousCommit`
|
|
331
344
|
|
|
332
345
|
Type: `string`
|
|
@@ -381,7 +394,7 @@ Required if the `auto` option is not set to `true`.
|
|
|
381
394
|
|
|
382
395
|
|
|
383
396
|
|
|
384
|
-
|
|
397
|
+
Configuration for adding deployment information to the release in Sentry.
|
|
385
398
|
### `release.deploy.env`
|
|
386
399
|
|
|
387
400
|
Type: `string`
|
|
@@ -534,52 +547,70 @@ type IncludeEntry = {
|
|
|
534
547
|
|
|
535
548
|
|
|
536
549
|
|
|
537
|
-
Options
|
|
550
|
+
Options for bundle size optimizations by excluding certain features.
|
|
538
551
|
### `bundleSizeOptimizations.excludeDebugStatements`
|
|
539
552
|
|
|
540
553
|
Type: `boolean`
|
|
541
554
|
|
|
542
|
-
|
|
543
|
-
|
|
555
|
+
Exclude debug statements from the bundle, thus disabling features like the SDK's `debug` option.
|
|
556
|
+
|
|
557
|
+
If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK during the build.
|
|
558
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
544
559
|
|
|
545
|
-
|
|
560
|
+
Defaults to `false`.
|
|
546
561
|
|
|
547
562
|
### `bundleSizeOptimizations.excludeTracing`
|
|
548
563
|
|
|
549
564
|
Type: `boolean`
|
|
550
565
|
|
|
566
|
+
Exclude tracing functionality from the bundle, thus disabling features like performance monitoring.
|
|
567
|
+
|
|
551
568
|
If set to `true`, the plugin will attempt to tree-shake (remove) code within the Sentry SDK that is related to tracing and performance monitoring.
|
|
552
|
-
Note that the success of this depends on tree
|
|
569
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
553
570
|
|
|
554
571
|
**Notice:** Do not enable this when you're using any performance monitoring-related SDK features (e.g. `Sentry.startTransaction()`).
|
|
555
572
|
|
|
573
|
+
Defaults to `false`.
|
|
574
|
+
|
|
556
575
|
### `bundleSizeOptimizations.excludeReplayShadowDom`
|
|
557
576
|
|
|
558
577
|
Type: `boolean`
|
|
559
578
|
|
|
579
|
+
Exclude Replay Shadow DOM functionality from the bundle.
|
|
580
|
+
|
|
560
581
|
If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay Shadow DOM recording functionality.
|
|
561
|
-
Note that the success of this depends on tree
|
|
582
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
562
583
|
|
|
563
584
|
This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.
|
|
564
585
|
|
|
586
|
+
Defaults to `false`.
|
|
587
|
+
|
|
565
588
|
### `bundleSizeOptimizations.excludeReplayIframe`
|
|
566
589
|
|
|
567
590
|
Type: `boolean`
|
|
568
591
|
|
|
592
|
+
Exclude Replay iFrame functionality from the bundle.
|
|
593
|
+
|
|
569
594
|
If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay `iframe` recording functionality.
|
|
570
|
-
Note that the success of this depends on tree
|
|
595
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
571
596
|
|
|
572
597
|
You can safely do this when you do not want to capture any `iframe` activity via Sentry Session Replay.
|
|
573
598
|
|
|
599
|
+
Defaults to `false`.
|
|
600
|
+
|
|
574
601
|
### `bundleSizeOptimizations.excludeReplayWorker`
|
|
575
602
|
|
|
576
603
|
Type: `boolean`
|
|
577
604
|
|
|
605
|
+
Exclude Replay worker functionality from the bundle.
|
|
606
|
+
|
|
578
607
|
If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay's Compression Web Worker.
|
|
579
|
-
Note that the success of this depends on tree
|
|
608
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
580
609
|
|
|
581
610
|
**Notice:** You should only use this option if you manually host a compression worker and configure it in your Sentry Session Replay integration config via the `workerUrl` option.
|
|
582
611
|
|
|
612
|
+
Defaults to `false`.
|
|
613
|
+
|
|
583
614
|
### `reactComponentAnnotation`
|
|
584
615
|
|
|
585
616
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/webpack-plugin",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Official Sentry Webpack plugin",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript-bundler-plugins.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/webpack-plugin",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"prepack": "ts-node ./src/prepack.ts"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@sentry/bundler-plugin-core": "4.0
|
|
56
|
+
"@sentry/bundler-plugin-core": "4.1.0",
|
|
57
57
|
"unplugin": "1.0.1",
|
|
58
58
|
"uuid": "^9.0.0"
|
|
59
59
|
},
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@babel/preset-typescript": "7.17.12",
|
|
64
64
|
"@rollup/plugin-babel": "5.3.1",
|
|
65
65
|
"@rollup/plugin-commonjs": "22.0.1",
|
|
66
|
-
"@sentry-internal/eslint-config": "4.0
|
|
67
|
-
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.0
|
|
66
|
+
"@sentry-internal/eslint-config": "4.1.0",
|
|
67
|
+
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.1.0",
|
|
68
68
|
"@swc/core": "^1.2.205",
|
|
69
69
|
"@swc/jest": "^0.2.21",
|
|
70
70
|
"@types/jest": "^28.1.3",
|