@sentry/vite-plugin 4.3.0 → 4.5.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.
Files changed (2) hide show
  1. package/README.md +34 -5
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -60,6 +60,35 @@ export default defineConfig({
60
60
  });
61
61
  ```
62
62
 
63
+ ### Multi-Project Configuration
64
+
65
+ If you want to upload the same source maps to multiple Sentry projects:
66
+
67
+ ```ts
68
+ // vite.config.ts
69
+ import { defineConfig } from "vite";
70
+ import { sentryVitePlugin } from "@sentry/vite-plugin";
71
+
72
+ export default defineConfig({
73
+ build: {
74
+ sourcemap: true,
75
+ },
76
+ plugins: [
77
+ sentryVitePlugin({
78
+ org: process.env.SENTRY_ORG,
79
+ project: ["frontend-team-a", "frontend-team-b", "frontend-team-c"],
80
+ authToken: process.env.SENTRY_AUTH_TOKEN,
81
+ }),
82
+ ],
83
+ });
84
+ ```
85
+
86
+ Or via environment variable:
87
+
88
+ ```bash
89
+ SENTRY_PROJECT=frontend-team-a,frontend-team-b,frontend-team-c
90
+ ```
91
+
63
92
  ## Options
64
93
 
65
94
  - [`org`](#org)
@@ -114,11 +143,11 @@ This value can also be specified via the `SENTRY_ORG` environment variable.
114
143
 
115
144
  ### `project`
116
145
 
146
+ Type: `string | string[]`
117
147
 
148
+ The slug of the Sentry project associated with the app. You can also provide an array of project slugs to upload source maps to multiple projects with the same release.
118
149
 
119
- The slug of the Sentry project associated with the app.
120
-
121
- This value can also be specified via the `SENTRY_PROJECT` environment variable.
150
+ This value can also be specified via the `SENTRY_PROJECT` environment variable. To specify multiple projects via the environment variable, separate them with commas: `SENTRY_PROJECT=project1,project2,project3`.
122
151
 
123
152
  ### `authToken`
124
153
 
@@ -151,7 +180,7 @@ Additional headers to send with every outgoing request to Sentry.
151
180
 
152
181
  Type: `boolean`
153
182
 
154
- Enable debug information logs during build-time. Enabling this will give you, for example, logs about source maps. Defaults to `false`.
183
+ Enable debug information logs during build-time. Enabling this will give you, for example, logs about source maps. This option also propagates the debug flag to the Sentry CLI by setting the `SENTRY_LOG_LEVEL` environment variable to `"debug"` if it's not already set. If you have explicitly set `SENTRY_LOG_LEVEL`, this option will be ignored. Defaults to `false`.
155
184
 
156
185
  ### `silent`
157
186
 
@@ -246,7 +275,7 @@ urls and absolute/relative paths). If that path doesn't exist, it then looks for
246
275
 
247
276
  Note: This is mostly helpful for complex builds with custom source map generation. For example, if you put source
248
277
  maps into a separate directory and rewrite the `//# sourceMappingURL=` comment to something other than a relative
249
- directory, sentry will be unable to locate the source maps for a given build artifact. This hook allows you to
278
+ directory, sentry will be unable to locate the source maps for a given build artifact. This hook allows you to
250
279
  implement the resolution process yourself.
251
280
 
252
281
  Use the `debug` option to print information about source map resolution.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/vite-plugin",
3
- "version": "4.3.0",
3
+ "version": "4.5.0",
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.3.0",
51
+ "@sentry/bundler-plugin-core": "4.5.0",
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.3.0",
61
- "@sentry-internal/sentry-bundler-plugin-tsconfig": "4.3.0",
60
+ "@sentry-internal/eslint-config": "4.5.0",
61
+ "@sentry-internal/sentry-bundler-plugin-tsconfig": "4.5.0",
62
62
  "@swc/core": "^1.2.205",
63
63
  "@swc/jest": "^0.2.21",
64
64
  "@types/jest": "^28.1.3",