shakacode / shakapacker

Use Webpack to manage app-like JavaScript modules in Rails
MIT License
400 stars 88 forks source link

Support for Rspack #476

Open justin808 opened 1 month ago

justin808 commented 1 month ago

See #225.

Let's see if we can get a PR showing https://www.rspack.dev/guide/start/introduction works.

tomdracz commented 1 month ago

TLDR; if there's interest, let's try to get some initial proof of concept of this and then figure out best way of handling integration.

FWIW I would love to see a proof of concept, but reviewing the docs of rspack, I feel there are fair few things that make it not quite out of the box experience.

Different plugins, packages (something that we rely on - webpack manifest plugin is not compatible for example and needs rspack equivalent) make the migration harder and supporting both more burdensome. We've been getting some Webpack-specific support queries lately and having another setup variation will make it harder to respond to those IMO.

I'd personally rather see a separate package that builts on top of/can be replacement to Shakapacker JS one, than bloating up the current one. After all, JS package is kinda optional, as long there's a manifest, the Ruby part can hook into it.

Long term, maybe there's a world where there's a "base" Shakapacker JS package with webpacker/rspack/whatever adapter?