Skip to content

Commit cfcecad

Browse files
AbhiPrasadLuca Forstner
andauthored
docs: Add migration docs for include option (#249)
Co-authored-by: Luca Forstner <luca.forstner@sentry.io>
1 parent 5d30e0b commit cfcecad

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

MIGRATION.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,34 @@ sentryWebpackPlugin({
3030
});
3131
```
3232

33+
### Removal of `include` for `sourcemap` option
34+
35+
The `include` option was removed in favour of the new `sourcemaps` option. If you cannot migrate to the `sourcemaps`, `include` is still avaliable as the `uploadLegacySourcemaps` option.
36+
37+
Use the `sourcemaps.assets` and `sourcemaps.ignore` options to indicate to the plugin which sourcemaps should be uploaded to Sentry. The plugin now also exposes `sourcemaps.deleteAfterUpload` to delete your sourcemaps after they have been uploaded to Sentry. With the `sourcemaps` options, you no longer need to set filename transforms like `urlPrefix` because the plugin uses a new debug IDs system to associate sourcemaps to your bundles.
38+
39+
```js
40+
// old initialization:
41+
import SentryWebpackPlugin from "@sentry/webpack-plugin";
42+
new SentryWebpackPlugin({
43+
include: {
44+
paths: ["./path1", "./path2"],
45+
ignore: ["./path2/ignore"],
46+
urlPrefix: "~/static/js",
47+
},
48+
});
49+
50+
// new initialization:
51+
import { sentryWebpackPlugin } from "@sentry/webpack-plugin";
52+
sentryWebpackPlugin({
53+
sourcemaps: {
54+
assets: ["./path1/**", "./path2/**"],
55+
ignore: ["./path2/ignore/**"],
56+
deleteFilesAfterUpload: ["./path1/**/*.map", "./path2/**/*.map"],
57+
},
58+
});
59+
```
60+
3361
### Replacing `entries` option with `releaseInjectionTargets`
3462

3563
Previously, the `entries` option was used to filter for _entrypoints_ that the plugin should inject the release into.

0 commit comments

Comments
 (0)