Hacker News new | ask | show | jobs
by hit8run 1710 days ago
What do you think of the importmap approach propagated by dhh on rails 7?
3 comments

I'm using it right now, it's fantastic. Also been playing around with Deno, importmaps are also used there, it's so much nicer than the bundle and compile everything workflow. It's the direction everyone should be going since it actually uses the browser and browser standards to their potential.

Also if people don't want to use CDNs both Rails and Deno do allow you to serve ES modules from your server.

I think it’s a fantastic default. I’d argue most server rendered applications can get away with it. And if you ever need ESBuild you can install the js-bundling gem or pass “-j esbuild” for new Rails 7 apps.
the only problem with this is that it's an option.

As a rails dev, I want one, strong opinion on what the default/best approach is. I don't want to configure anything

No importmaps are the new default in Rails 7. The menu is still omakase. In case you have different requirements you can use options.