Skip to content
This repository was archived by the owner on Oct 29, 2026. It is now read-only.

feat(webpack): Add sentry/webpack-plugin/webpack5 export for webpack 5.1+ and compatible environments - #715

Merged
krystofwoldrich merged 4 commits into
mainfrom
kw-webpack-5-1-plus
Apr 2, 2025
Merged

krystofwoldrich merged 4 commits into
mainfrom
kw-webpack-5-1-plus

Conversation

@krystofwoldrich

@krystofwoldrich krystofwoldrich commented Apr 2, 2025 •

Copy link
Copy Markdown
Contributor

This PR adds @sentry/webpack-plugin/webpack5 export, which doesn't depend on the webpack module as recommended in the official webpack guide https://webpack.js.org/contribute/writing-a-plugin/#example.

This makes the plugin compatible with webpack like environments, for example, rspack, without the need to add webpack to the project.

import { sentryWebpackPlugin } from '@sentry/webpack-plugin/webpack5'

sentryWebpackPlugin({
}),

The public interface is the same. In the future major version, this can be the default export, but at the moment, it would be a breaking change.

@krystofwoldrich
krystofwoldrich requested review from Lms24 and lforst April 2, 2025 09:04
Comment thread packages/webpack-plugin/src/plugin.ts Resolved
Comment thread packages/webpack-plugin/src/plugin.ts Resolved

@lforst lforst left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice solution!

@krystofwoldrich
krystofwoldrich merged commit f577a47 into main Apr 2, 2025
@krystofwoldrich
krystofwoldrich deleted the kw-webpack-5-1-plus branch April 2, 2025 16:04
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Apr 5, 2025
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 3.2.4 | 3.3.1 |


## [v3.3.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#331)

-   fix(webpack5): All `esm` files must have `.mjs` postfix ([#721](getsentry/sentry-javascript-bundler-plugins#721))


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

-   feat(webpack): Add `@sentry/webpack-plugin/webpack5` export for webpack 5.1+ and compatible environments ([#715](getsentry/sentry-javascript-bundler-plugins#715))
-   feat: Only do automatic commit association for Vercel production environments ([#711](getsentry/sentry-javascript-bundler-plugins#711))
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Apr 5, 2025
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | @sentry/vite-plugin | 3.2.4 | 3.3.1 |


## [v3.3.1](https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/HEAD/CHANGELOG.md#331)

-   fix(webpack5): All `esm` files must have `.mjs` postfix ([#721](getsentry/sentry-javascript-bundler-plugins#721))


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

-   feat(webpack): Add `@sentry/webpack-plugin/webpack5` export for webpack 5.1+ and compatible environments ([#715](getsentry/sentry-javascript-bundler-plugins#715))
-   feat: Only do automatic commit association for Vercel production environments ([#711](getsentry/sentry-javascript-bundler-plugins#711))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants