Skip to content

fix(webpack): Await source map deletion before signaling build completion#918

Merged
andreiborza merged 2 commits into
mainfrom
ab/webpack-await-sourcemap-deletion
Apr 28, 2026
Merged

fix(webpack): Await source map deletion before signaling build completion#918
andreiborza merged 2 commits into
mainfrom
ab/webpack-await-sourcemap-deletion

Conversation

@andreiborza
Copy link
Copy Markdown
Member

This PR reworks the webpack plugin to await the source map deletion before moving on. This matches the behavior of the rollup and esbuild plugins.

Additionally, it does not swallow potential errors and passes them to to passed-in callback handler.

…tion

This PR reworks the webpack plugin to await the source map deletion before
moving on. This matches the behavior of the rollup and esbuild plugins.
@andreiborza andreiborza requested a review from chargome April 27, 2026 08:17
@andreiborza andreiborza requested a review from timfish April 28, 2026 07:20
Comment thread packages/webpack-plugin/src/webpack4and5.ts
@andreiborza andreiborza merged commit b7d8ea6 into main Apr 28, 2026
31 checks passed
@andreiborza andreiborza deleted the ab/webpack-await-sourcemap-deletion branch April 28, 2026 08:29
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 2, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.2.1 |


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 3, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.2.1 |


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 6, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.2.1 |


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 6, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.2.1 |


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 7, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.2.1 |


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 8, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.2.1 |


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 10, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.2.1 |


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 12, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.2.1 |


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 13, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.3.0 |


## [v5.3.0](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#530)

##### New Features ✨

- (babel) Auto-inject sentry-label from static text children by [@antonis](https://github.com/antonis) in [#925](getsentry/sentry-javascript-bundler-plugins#925)

##### Bug Fixes 🐛

- (vite) Avoid version-specific plugin return type by [@logaretm](https://github.com/logaretm) in [#928](getsentry/sentry-javascript-bundler-plugins#928)

##### Internal Changes 🔧

- Fix craft config by [@timfish](https://github.com/timfish) in [#930](getsentry/sentry-javascript-bundler-plugins#930)
- Update craft by [@timfish](https://github.com/timfish) in [#929](getsentry/sentry-javascript-bundler-plugins#929)
- Use Rolldown v1 stable by [@timfish](https://github.com/timfish) in [#924](getsentry/sentry-javascript-bundler-plugins#924)
- Remove old integration tests by [@timfish](https://github.com/timfish) in [#922](getsentry/sentry-javascript-bundler-plugins#922)
- Ensure correct bundlers are resolved by [@timfish](https://github.com/timfish) in [#921](getsentry/sentry-javascript-bundler-plugins#921)
- Fix telemetry tests to capture all envelopes by [@timfish](https://github.com/timfish) in [#920](getsentry/sentry-javascript-bundler-plugins#920)


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request May 13, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 5.2.0 | 5.3.0 |


## [v5.3.0](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#530)

##### New Features ✨

- (babel) Auto-inject sentry-label from static text children by [@antonis](https://github.com/antonis) in [#925](getsentry/sentry-javascript-bundler-plugins#925)

##### Bug Fixes 🐛

- (vite) Avoid version-specific plugin return type by [@logaretm](https://github.com/logaretm) in [#928](getsentry/sentry-javascript-bundler-plugins#928)

##### Internal Changes 🔧

- Fix craft config by [@timfish](https://github.com/timfish) in [#930](getsentry/sentry-javascript-bundler-plugins#930)
- Update craft by [@timfish](https://github.com/timfish) in [#929](getsentry/sentry-javascript-bundler-plugins#929)
- Use Rolldown v1 stable by [@timfish](https://github.com/timfish) in [#924](getsentry/sentry-javascript-bundler-plugins#924)
- Remove old integration tests by [@timfish](https://github.com/timfish) in [#922](getsentry/sentry-javascript-bundler-plugins#922)
- Ensure correct bundlers are resolved by [@timfish](https://github.com/timfish) in [#921](getsentry/sentry-javascript-bundler-plugins#921)
- Fix telemetry tests to capture all envelopes by [@timfish](https://github.com/timfish) in [#920](getsentry/sentry-javascript-bundler-plugins#920)


## [v5.2.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#521)

##### Bug Fixes 🐛

- (webpack) Await source map deletion before signaling build completion by [@andreiborza](https://github.com/andreiborza) in [#918](getsentry/sentry-javascript-bundler-plugins#918)

##### Internal Changes 🔧

- (ci) Disable changelog preview by [@chargome](https://github.com/chargome) in [#917](getsentry/sentry-javascript-bundler-plugins#917)
- Add additional integration tests by [@timfish](https://github.com/timfish) in [#914](getsentry/sentry-javascript-bundler-plugins#914)
- Remove unused e2e tests by [@timfish](https://github.com/timfish) in [#915](getsentry/sentry-javascript-bundler-plugins#915)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants