chloerei
(Rei)
December 22, 2024, 9:13am
5
--download
option has been remove. Pinning should just always download by dhh · Pull Request #217 · rails/importmap-rails · GitHub
Now I use esbuild to handle some dependencies.
Original post: Importmap or jsbundling? I use both - DEV Community
Starting from Rails 7, Importmap has become the default mechanism for handling JavaScript loading. It can fully utilize HTTP/2’s parallel download and caching mechanisms, avoiding the need to download all code every time a change is made by bundling everything into one large package.
For js dependencies, Importmap provides a pin feature, for example, by running:
./bin/importmap pin local-time
Importmap will download the loca…
I am considering returning to bundling because the js ecosystem is still built around builders. To reach no-build, you need to reduce dependencies as much as possible, like the 37signals project.