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