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