@sentry/vite-plugin 3.4.0 → 3.6.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 +24 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -76,6 +76,7 @@ export default defineConfig({
|
|
|
76
76
|
- [`assets`](#sourcemapsassets)
|
|
77
77
|
- [`ignore`](#sourcemapsignore)
|
|
78
78
|
- [`rewriteSources`](#sourcemapsrewritesources)
|
|
79
|
+
- [`resolveSourceMap`](#sourcemapsresolvesourcemap)
|
|
79
80
|
- [`filesToDeleteAfterUpload`](#sourcemapsfilestodeleteafterupload)
|
|
80
81
|
- [`disable`](#sourcemapsdisable)
|
|
81
82
|
- [`release`](#release)
|
|
@@ -225,6 +226,29 @@ Hook to rewrite the `sources` field inside the source map before being uploaded
|
|
|
225
226
|
|
|
226
227
|
Defaults to making all sources relative to `process.cwd()` while building.
|
|
227
228
|
|
|
229
|
+
### `sourcemaps.resolveSourceMap`
|
|
230
|
+
|
|
231
|
+
Type: `(artifactPath: string, sourceMappingUrl: string | undefined) => string | undefined | Promise<string | undefined>`
|
|
232
|
+
|
|
233
|
+
Hook to customize source map file resolution.
|
|
234
|
+
|
|
235
|
+
The hook is called with the absolute path of the build artifact and the value of the `//# sourceMappingURL=`
|
|
236
|
+
comment, if present. The hook should then return an absolute path (or a promise that resolves to one) indicating
|
|
237
|
+
where to find the artifact's corresponding source map file. If no path is returned or the returned path doesn't
|
|
238
|
+
exist, the standard source map resolution process will be used.
|
|
239
|
+
|
|
240
|
+
The standard process first tries to resolve based on the `//# sourceMappingURL=` value (it supports `file://`
|
|
241
|
+
urls and absolute/relative paths). If that path doesn't exist, it then looks for a file named
|
|
242
|
+
`${artifactName}.map` in the same directory as the artifact.
|
|
243
|
+
|
|
244
|
+
Note: This is mostly helpful for complex builds with custom source map generation. For example, if you put source
|
|
245
|
+
maps into a separate directory and rewrite the `//# sourceMappingURL=` comment to something other than a relative
|
|
246
|
+
directory, sentry will be unable to locate the source maps for a given build artifact. This hook allows you to
|
|
247
|
+
implement the resolution process yourself.
|
|
248
|
+
|
|
249
|
+
Use the `debug` option to print information about source map resolution.
|
|
250
|
+
|
|
251
|
+
|
|
228
252
|
### `sourcemaps.filesToDeleteAfterUpload`
|
|
229
253
|
|
|
230
254
|
Type: `string | string[] | Promise<string | string[]>`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/vite-plugin",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.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": "3.
|
|
51
|
+
"@sentry/bundler-plugin-core": "3.6.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": "3.
|
|
61
|
-
"@sentry-internal/sentry-bundler-plugin-tsconfig": "3.
|
|
60
|
+
"@sentry-internal/eslint-config": "3.6.0",
|
|
61
|
+
"@sentry-internal/sentry-bundler-plugin-tsconfig": "3.6.0",
|
|
62
62
|
"@swc/core": "^1.2.205",
|
|
63
63
|
"@swc/jest": "^0.2.21",
|
|
64
64
|
"@types/jest": "^28.1.3",
|