Add Rspack optional peer dependency for @tailwindcss/webpack (#20027)

## Summary

This PR makes Rspack support explicit for `@tailwindcss/webpack` by
adding `@rspack/core` as an optional peer dependency alongside
`webpack`.

The loader already works through Rspack's webpack-compatible loader API,
as shown in this runnable example:
https://github.com/rstackjs/rstack-examples/tree/main/rspack/tailwindcss.
The README and package description are updated to document that usage.

## Test plan

No Rspack-specific tests were added. The loader implementation is
unchanged, and the existing webpack loader tests exercise the same
loader API path that Rspack uses, which should cover the relevant
behavior.

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This commit is contained in:
Jiahan Chen 2026-05-23 17:14:48 +08:00 • committed by GitHub
parent 73983e1cf5
commit 982e920df8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 131 additions and 1 deletions

View file

@ -41,6 +41,15 @@
"webpack": "catalog:"
},
"peerDependencies": {
"webpack": "^5"
"@rspack/core": "^1.0.0 || ^2.0.0",
"webpack": "^5.0.0"
},
"peerDependenciesMeta": {
"@rspack/core": {
"optional": true
},
"webpack": {
"optional": true
}
}
}