@sentry/vite-plugin 4.0.2 → 4.1.1
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
|
@@ -124,10 +124,13 @@ This value can also be specified via the `SENTRY_PROJECT` environment variable.
|
|
|
124
124
|
|
|
125
125
|
Type: `string`
|
|
126
126
|
|
|
127
|
-
The authentication token to use for all communication with Sentry.
|
|
127
|
+
The authentication token to use for all communication with Sentry.
|
|
128
|
+
Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.
|
|
128
129
|
|
|
129
130
|
This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
|
|
130
131
|
|
|
132
|
+
Check out the docs on organization tokens: https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
|
|
133
|
+
|
|
131
134
|
### `url`
|
|
132
135
|
|
|
133
136
|
Type: `string`
|
|
@@ -142,19 +145,19 @@ Defaults to https://sentry.io/, which is the correct value for SaaS customers.
|
|
|
142
145
|
|
|
143
146
|
Type: `Record<string, string>`
|
|
144
147
|
|
|
145
|
-
|
|
148
|
+
Additional headers to send with every outgoing request to Sentry.
|
|
146
149
|
|
|
147
150
|
### `debug`
|
|
148
151
|
|
|
149
152
|
Type: `boolean`
|
|
150
153
|
|
|
151
|
-
|
|
154
|
+
Enable debug information logs during build-time. Enabling this will give you, for example, logs about source maps. Defaults to `false`.
|
|
152
155
|
|
|
153
156
|
### `silent`
|
|
154
157
|
|
|
155
158
|
Type: `boolean`
|
|
156
159
|
|
|
157
|
-
Suppresses all logs. Defaults to `false`.
|
|
160
|
+
Suppresses all build logs (all log levels, including errors). Defaults to `false`.
|
|
158
161
|
|
|
159
162
|
### `errorHandler`
|
|
160
163
|
|
|
@@ -177,9 +180,9 @@ errorHandler: (err) => {
|
|
|
177
180
|
|
|
178
181
|
Type: `boolean`
|
|
179
182
|
|
|
180
|
-
If
|
|
183
|
+
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.
|
|
181
184
|
|
|
182
|
-
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.
|
|
185
|
+
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.
|
|
183
186
|
|
|
184
187
|
Defaults to `true`.
|
|
185
188
|
|
|
@@ -193,16 +196,16 @@ Completely disables all functionality of the plugin. Defaults to `false`.
|
|
|
193
196
|
|
|
194
197
|
|
|
195
198
|
|
|
196
|
-
Options
|
|
199
|
+
Options related to source maps upload and processing.
|
|
197
200
|
### `sourcemaps.assets`
|
|
198
201
|
|
|
199
202
|
Type: `string | string[]`
|
|
200
203
|
|
|
201
|
-
A glob or an array of globs that
|
|
204
|
+
A glob or an array of globs that specify the build artifacts and source maps that will be uploaded to Sentry.
|
|
202
205
|
|
|
203
|
-
|
|
206
|
+
The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
|
|
204
207
|
|
|
205
|
-
|
|
208
|
+
If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
|
|
206
209
|
|
|
207
210
|
Use the `debug` option to print information about which files end up being uploaded.
|
|
208
211
|
|
|
@@ -212,12 +215,12 @@ Type: `string | string[]`
|
|
|
212
215
|
|
|
213
216
|
A glob or an array of globs that specifies which build artifacts should not be uploaded to Sentry.
|
|
214
217
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
|
|
218
|
+
The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
|
|
218
219
|
|
|
219
220
|
Use the `debug` option to print information about which files end up being uploaded.
|
|
220
221
|
|
|
222
|
+
Default: `[]`
|
|
223
|
+
|
|
221
224
|
### `sourcemaps.rewriteSources`
|
|
222
225
|
|
|
223
226
|
Type: `(source: string, map: any) => string`
|
|
@@ -255,7 +258,9 @@ Type: `string | string[] | Promise<string | string[]>`
|
|
|
255
258
|
|
|
256
259
|
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.
|
|
257
260
|
|
|
258
|
-
|
|
261
|
+
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).
|
|
262
|
+
|
|
263
|
+
The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
|
|
259
264
|
|
|
260
265
|
Use the `debug` option to print information about which files end up being deleted.
|
|
261
266
|
|
|
@@ -263,7 +268,7 @@ Use the `debug` option to print information about which files end up being delet
|
|
|
263
268
|
|
|
264
269
|
Type: `boolean`
|
|
265
270
|
|
|
266
|
-
|
|
271
|
+
If this flag is `true`, any functionality related to source maps will be disabled.
|
|
267
272
|
|
|
268
273
|
Defaults to `false`.
|
|
269
274
|
|
|
@@ -282,9 +287,9 @@ Unique identifier for the release you want to create.
|
|
|
282
287
|
|
|
283
288
|
This value can also be specified via the `SENTRY_RELEASE` environment variable.
|
|
284
289
|
|
|
285
|
-
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
|
|
290
|
+
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).
|
|
286
291
|
|
|
287
|
-
If
|
|
292
|
+
If no `name` is provided and the plugin can't automatically detect one, no release will be created.
|
|
288
293
|
|
|
289
294
|
### `release.inject`
|
|
290
295
|
|
|
@@ -298,7 +303,9 @@ Defaults to `true`.
|
|
|
298
303
|
|
|
299
304
|
Type: `boolean`
|
|
300
305
|
|
|
301
|
-
Whether the plugin should create a release on Sentry during the build.
|
|
306
|
+
Whether the plugin should create a release on Sentry during the build.
|
|
307
|
+
|
|
308
|
+
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)
|
|
302
309
|
|
|
303
310
|
Defaults to `true`.
|
|
304
311
|
|
|
@@ -306,7 +313,7 @@ Defaults to `true`.
|
|
|
306
313
|
|
|
307
314
|
Type: `boolean`
|
|
308
315
|
|
|
309
|
-
Whether the
|
|
316
|
+
Whether to automatically finalize the release. The release is finalized by adding an end timestamp after the build ends.
|
|
310
317
|
|
|
311
318
|
Defaults to `true`.
|
|
312
319
|
|
|
@@ -314,13 +321,15 @@ Defaults to `true`.
|
|
|
314
321
|
|
|
315
322
|
Type: `string`
|
|
316
323
|
|
|
317
|
-
Unique identifier for the
|
|
324
|
+
Unique distribution identifier for the release. Used to further segment the release.
|
|
325
|
+
|
|
326
|
+
Usually your build number.
|
|
318
327
|
|
|
319
328
|
### `release.vcsRemote`
|
|
320
329
|
|
|
321
330
|
Type: `string`
|
|
322
331
|
|
|
323
|
-
Version control system remote name.
|
|
332
|
+
Version control system (VCS) remote name.
|
|
324
333
|
|
|
325
334
|
This value can also be specified via the `SENTRY_VSC_REMOTE` environment variable.
|
|
326
335
|
|
|
@@ -330,7 +339,11 @@ Defaults to 'origin'.
|
|
|
330
339
|
|
|
331
340
|
|
|
332
341
|
|
|
333
|
-
|
|
342
|
+
Configuration for associating the release with its commits in Sentry.
|
|
343
|
+
|
|
344
|
+
Set to `false` to disable commit association.
|
|
345
|
+
|
|
346
|
+
Defaults to `{ auto: true }`.
|
|
334
347
|
### `release.setCommits.previousCommit`
|
|
335
348
|
|
|
336
349
|
Type: `string`
|
|
@@ -385,7 +398,7 @@ Required if the `auto` option is not set to `true`.
|
|
|
385
398
|
|
|
386
399
|
|
|
387
400
|
|
|
388
|
-
|
|
401
|
+
Configuration for adding deployment information to the release in Sentry.
|
|
389
402
|
### `release.deploy.env`
|
|
390
403
|
|
|
391
404
|
Type: `string`
|
|
@@ -538,52 +551,70 @@ type IncludeEntry = {
|
|
|
538
551
|
|
|
539
552
|
|
|
540
553
|
|
|
541
|
-
Options
|
|
554
|
+
Options for bundle size optimizations by excluding certain features.
|
|
542
555
|
### `bundleSizeOptimizations.excludeDebugStatements`
|
|
543
556
|
|
|
544
557
|
Type: `boolean`
|
|
545
558
|
|
|
546
|
-
|
|
547
|
-
|
|
559
|
+
Exclude debug statements from the bundle, thus disabling features like the SDK's `debug` option.
|
|
560
|
+
|
|
561
|
+
If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK during the build.
|
|
562
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
548
563
|
|
|
549
|
-
|
|
564
|
+
Defaults to `false`.
|
|
550
565
|
|
|
551
566
|
### `bundleSizeOptimizations.excludeTracing`
|
|
552
567
|
|
|
553
568
|
Type: `boolean`
|
|
554
569
|
|
|
570
|
+
Exclude tracing functionality from the bundle, thus disabling features like performance monitoring.
|
|
571
|
+
|
|
555
572
|
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.
|
|
556
|
-
Note that the success of this depends on tree
|
|
573
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
557
574
|
|
|
558
575
|
**Notice:** Do not enable this when you're using any performance monitoring-related SDK features (e.g. `Sentry.startTransaction()`).
|
|
559
576
|
|
|
577
|
+
Defaults to `false`.
|
|
578
|
+
|
|
560
579
|
### `bundleSizeOptimizations.excludeReplayShadowDom`
|
|
561
580
|
|
|
562
581
|
Type: `boolean`
|
|
563
582
|
|
|
583
|
+
Exclude Replay Shadow DOM functionality from the bundle.
|
|
584
|
+
|
|
564
585
|
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.
|
|
565
|
-
Note that the success of this depends on tree
|
|
586
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
566
587
|
|
|
567
588
|
This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.
|
|
568
589
|
|
|
590
|
+
Defaults to `false`.
|
|
591
|
+
|
|
569
592
|
### `bundleSizeOptimizations.excludeReplayIframe`
|
|
570
593
|
|
|
571
594
|
Type: `boolean`
|
|
572
595
|
|
|
596
|
+
Exclude Replay iFrame functionality from the bundle.
|
|
597
|
+
|
|
573
598
|
If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay `iframe` recording functionality.
|
|
574
|
-
Note that the success of this depends on tree
|
|
599
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
575
600
|
|
|
576
601
|
You can safely do this when you do not want to capture any `iframe` activity via Sentry Session Replay.
|
|
577
602
|
|
|
603
|
+
Defaults to `false`.
|
|
604
|
+
|
|
578
605
|
### `bundleSizeOptimizations.excludeReplayWorker`
|
|
579
606
|
|
|
580
607
|
Type: `boolean`
|
|
581
608
|
|
|
609
|
+
Exclude Replay worker functionality from the bundle.
|
|
610
|
+
|
|
582
611
|
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.
|
|
583
|
-
Note that the success of this depends on tree
|
|
612
|
+
Note that the success of this depends on tree-shaking being enabled in your build tooling.
|
|
584
613
|
|
|
585
614
|
**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.
|
|
586
615
|
|
|
616
|
+
Defaults to `false`.
|
|
617
|
+
|
|
587
618
|
### `reactComponentAnnotation`
|
|
588
619
|
|
|
589
620
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/vite-plugin",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Official Sentry Vite 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/vite-plugin",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"prepack": "ts-node ./src/prepack.ts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@sentry/bundler-plugin-core": "4.
|
|
51
|
+
"@sentry/bundler-plugin-core": "4.1.1",
|
|
52
52
|
"unplugin": "1.0.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
"@babel/preset-typescript": "7.17.12",
|
|
58
58
|
"@rollup/plugin-babel": "5.3.1",
|
|
59
59
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
60
|
-
"@sentry-internal/eslint-config": "4.
|
|
61
|
-
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.
|
|
60
|
+
"@sentry-internal/eslint-config": "4.1.1",
|
|
61
|
+
"@sentry-internal/sentry-bundler-plugin-tsconfig": "4.1.1",
|
|
62
62
|
"@swc/core": "^1.2.205",
|
|
63
63
|
"@swc/jest": "^0.2.21",
|
|
64
64
|
"@types/jest": "^28.1.3",
|