fix: mark webpack as optional peer dependency#1061
Conversation
There was a problem hiding this comment.
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/coreas an optional peer dependency with version range^1.0.0 || ^2.0.0-0 - Marked both
@rspack/coreandwebpackas optional inpeerDependenciesMeta - 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.
a4de967 to
a886527
Compare
a886527 to
e562742
Compare
|
Thank you! Could you update the tests to test rspack compatibility? |
|
Sure! I have updated all test cases to test both webpack and Rspack. |
|
@nicolo-ribaudo When you have a chance, please take a look. Thanks! |
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
Thank you! @JLHwung could you also take a look since you have more experience with this codebase?
…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) [](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)
Summary
@rspack/coreas an optional peer dependencypeerDependenciesMetato mark both@rspack/coreandwebpackas optionalREADME.mdnow mentions that babal-loader can be used with bothwebpackandRspack