Menu

Rails + Rspack: esbuild speed, webpack features, one command
📰

Rails + Rspack: esbuild speed, webpack features, one command

DEV Community: rails·Nguyễn Thanh Tùng·12 days ago
#51YU6gSs
#devtorails#devto#dev#rails#rspack
Long article (982 words) — no AI summary yet.
Reading 0:00
15s threshold

Why I went looking

I wanted one thing from my Rails frontend setup: change a file and see it on the page, without losing where I was.

esbuild through jsbundling-rails gets close. Builds are fast and the config is one line. But every change is a full page reload. The modal I opened, the form I half filled, the Stimulus controller's state: gone, every time. Over a day of UI work that adds up to hundreds of small resets.

Webpacker and Shakapacker give you hot module replacement, but I remember what came with it. A config you are scared to touch, cold builds measured in tens of seconds, and upgrades that meant diffing generated files by hand.

Rspack promised both: webpack's features, including HMR, with a Rust core that builds at esbuild speed.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.