Skip to content

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
mergify bot added a commit to robfrank/linklift that referenced this pull request Mar 10, 2026
…skip ci]

Bumps [babel-loader](https://github.com/babel/babel-loader) from 10.0.0 to 10.1.0.
Release notes

*Sourced from [babel-loader's releases](https://github.com/babel/babel-loader/releases).*

> v10.1.0
> -------
>
> What's Changed
> --------------
>
> * refactor: use `module.findPackageJSON` API by [`@​JLHwung`](https://github.com/JLHwung) in [babel/babel-loader#1055](https://redirect.github.com/babel/babel-loader/pull/1055)
> * Enable type checking and support Babel 8 by [`@​JLHwung`](https://github.com/JLHwung) in [babel/babel-loader#1056](https://redirect.github.com/babel/babel-loader/pull/1056)
> * Bump js-yaml from 4.1.0 to 4.1.1 by [`@​dependabot`](https://github.com/dependabot)[bot] in [babel/babel-loader#1059](https://redirect.github.com/babel/babel-loader/pull/1059)
> * fix: mark webpack as optional peer dependency by [`@​chenjiahan`](https://github.com/chenjiahan) in [babel/babel-loader#1061](https://redirect.github.com/babel/babel-loader/pull/1061)
> * Bump webpack from 5.101.0 to 5.104.1 by [`@​dependabot`](https://github.com/dependabot)[bot] in [babel/babel-loader#1062](https://redirect.github.com/babel/babel-loader/pull/1062)
> * Bump glob from 10.4.5 to 10.5.0 by [`@​dependabot`](https://github.com/dependabot)[bot] in [babel/babel-loader#1060](https://redirect.github.com/babel/babel-loader/pull/1060)
> * Bump minimatch from 3.1.2 to 3.1.5 by [`@​dependabot`](https://github.com/dependabot)[bot] in [babel/babel-loader#1063](https://redirect.github.com/babel/babel-loader/pull/1063)
> * Pin Node.js on CI by [`@​nicolo-ribaudo`](https://github.com/nicolo-ribaudo) in [babel/babel-loader#1064](https://redirect.github.com/babel/babel-loader/pull/1064)
>
> New Contributors
> ----------------
>
> * [`@​chenjiahan`](https://github.com/chenjiahan) made their first contribution in [babel/babel-loader#1061](https://redirect.github.com/babel/babel-loader/pull/1061)
>
> **Full Changelog**: <babel/babel-loader@v10.0.0...v10.1.0>


Commits

* [`de09ee1`](babel/babel-loader@de09ee1) 10.1.0
* [`e34c360`](babel/babel-loader@e34c360) Pin Node.js on CI ([#1064](https://redirect.github.com/babel/babel-loader/issues/1064))
* [`3c1e180`](babel/babel-loader@3c1e180) Bump minimatch from 3.1.2 to 3.1.5 ([#1063](https://redirect.github.com/babel/babel-loader/issues/1063))
* [`e0d4add`](babel/babel-loader@e0d4add) Bump glob from 10.4.5 to 10.5.0 ([#1060](https://redirect.github.com/babel/babel-loader/issues/1060))
* [`77e2a66`](babel/babel-loader@77e2a66) Bump webpack from 5.101.0 to 5.104.1 ([#1062](https://redirect.github.com/babel/babel-loader/issues/1062))
* [`faa5dbb`](babel/babel-loader@faa5dbb) fix: mark webpack as optional peer dependency ([#1061](https://redirect.github.com/babel/babel-loader/issues/1061))
* [`146dad2`](babel/babel-loader@146dad2) Bump js-yaml from 4.1.0 to 4.1.1 ([#1059](https://redirect.github.com/babel/babel-loader/issues/1059))
* [`2479ed2`](babel/babel-loader@2479ed2) Enable type checking and support Babel 8 ([#1056](https://redirect.github.com/babel/babel-loader/issues/1056))
* [`242e7d2`](babel/babel-loader@242e7d2) refactor: use module.findPackageJSON API ([#1055](https://redirect.github.com/babel/babel-loader/issues/1055))
* See full diff in [compare view](babel/babel-loader@v10.0.0...v10.1.0)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=babel-loader&package-manager=npm\_and\_yarn&previous-version=10.0.0&new-version=10.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
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.

4 participants