@sentry/rollup-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
|
@@ -71,6 +71,7 @@ export default {
|
|
|
71
71
|
- [`assets`](#sourcemapsassets)
|
|
72
72
|
- [`ignore`](#sourcemapsignore)
|
|
73
73
|
- [`rewriteSources`](#sourcemapsrewritesources)
|
|
74
|
+
- [`resolveSourceMap`](#sourcemapsresolvesourcemap)
|
|
74
75
|
- [`filesToDeleteAfterUpload`](#sourcemapsfilestodeleteafterupload)
|
|
75
76
|
- [`disable`](#sourcemapsdisable)
|
|
76
77
|
- [`release`](#release)
|
|
@@ -220,6 +221,29 @@ Hook to rewrite the `sources` field inside the source map before being uploaded
|
|
|
220
221
|
|
|
221
222
|
Defaults to making all sources relative to `process.cwd()` while building.
|
|
222
223
|
|
|
224
|
+
### `sourcemaps.resolveSourceMap`
|
|
225
|
+
|
|
226
|
+
Type: `(artifactPath: string, sourceMappingUrl: string | undefined) => string | undefined | Promise<string | undefined>`
|
|
227
|
+
|
|
228
|
+
Hook to customize source map file resolution.
|
|
229
|
+
|
|
230
|
+
The hook is called with the absolute path of the build artifact and the value of the `//# sourceMappingURL=`
|
|
231
|
+
comment, if present. The hook should then return an absolute path (or a promise that resolves to one) indicating
|
|
232
|
+
where to find the artifact's corresponding source map file. If no path is returned or the returned path doesn't
|
|
233
|
+
exist, the standard source map resolution process will be used.
|
|
234
|
+
|
|
235
|
+
The standard process first tries to resolve based on the `//# sourceMappingURL=` value (it supports `file://`
|
|
236
|
+
urls and absolute/relative paths). If that path doesn't exist, it then looks for a file named
|
|
237
|
+
`${artifactName}.map` in the same directory as the artifact.
|
|
238
|
+
|
|
239
|
+
Note: This is mostly helpful for complex builds with custom source map generation. For example, if you put source
|
|
240
|
+
maps into a separate directory and rewrite the `//# sourceMappingURL=` comment to something other than a relative
|
|
241
|
+
directory, sentry will be unable to locate the source maps for a given build artifact. This hook allows you to
|
|
242
|
+
implement the resolution process yourself.
|
|
243
|
+
|
|
244
|
+
Use the `debug` option to print information about source map resolution.
|
|
245
|
+
|
|
246
|
+
|
|
223
247
|
### `sourcemaps.filesToDeleteAfterUpload`
|
|
224
248
|
|
|
225
249
|
Type: `string | string[] | Promise<string | string[]>`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/rollup-plugin",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Official Sentry Rollup 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/rollup-plugin",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"prepack": "ts-node ./src/prepack.ts"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@sentry/bundler-plugin-core": "3.
|
|
52
|
+
"@sentry/bundler-plugin-core": "3.6.0",
|
|
53
53
|
"unplugin": "1.0.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@babel/preset-typescript": "7.17.12",
|
|
62
62
|
"@rollup/plugin-babel": "5.3.1",
|
|
63
63
|
"@rollup/plugin-node-resolve": "13.3.0",
|
|
64
|
-
"@sentry-internal/eslint-config": "3.
|
|
65
|
-
"@sentry-internal/sentry-bundler-plugin-tsconfig": "3.
|
|
64
|
+
"@sentry-internal/eslint-config": "3.6.0",
|
|
65
|
+
"@sentry-internal/sentry-bundler-plugin-tsconfig": "3.6.0",
|
|
66
66
|
"@swc/core": "^1.2.205",
|
|
67
67
|
"@swc/jest": "^0.2.21",
|
|
68
68
|
"@types/jest": "^28.1.3",
|