Skip to content

Comments

fix: mark webpack as optional peer dependency#1061

Merged
JLHwung merged 4 commits intobabel:mainfrom
chenjiahan:webpack_peer_0205
Feb 15, 2026
Merged

fix: mark webpack as optional peer dependency#1061
JLHwung merged 4 commits intobabel:mainfrom
chenjiahan:webpack_peer_0205

Conversation

@chenjiahan
Copy link
Contributor

Summary

  • Added @rspack/core as an optional peer dependency
  • Updated peerDependenciesMeta to mark both @rspack/core and webpack as optional
  • The README.md now mentions that babal-loader can be used with both webpack and Rspack

Copilot AI review requested due to automatic review settings February 5, 2026 07:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables babel-loader to work with both webpack and Rspack by marking both as optional peer dependencies. This allows users to choose either bundler without requiring both to be installed.

Changes:

  • Added @rspack/core as an optional peer dependency with version range ^1.0.0 || ^2.0.0-0
  • Marked both @rspack/core and webpack as optional in peerDependenciesMeta
  • Updated README.md description to mention Rspack support alongside webpack

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
package.json Added @rspack/core as optional peer dependency and configured peerDependenciesMeta to mark both webpack and @rspack/core as optional
README.md Updated package description to indicate support for both webpack and Rspack

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Feb 5, 2026

Thank you! Could you update the tests to test rspack compatibility?

@chenjiahan
Copy link
Contributor Author

Sure! I have updated all test cases to test both webpack and Rspack.

@chenjiahan
Copy link
Contributor Author

@nicolo-ribaudo When you have a chance, please take a look. Thanks!

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

Thank you! @JLHwung could you also take a look since you have more experience with this codebase?

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

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

Great work! Thank you.

@JLHwung JLHwung merged commit faa5dbb into babel:main Feb 15, 2026
16 checks passed
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