Why does rails omit ImportMap if -j or -css flag used on a new app?

Viewed 109

If I run the following command, Rails will build a new app without ImportMap.

rails new rails_seven_app --database=postgresql --css bootstrap

If I remove the --css flag, Rails will use ImportMap.

I'm curious why this would be the case. ImportMap's seem to add a lot of nice simplicity to a Rails app...why do I need to throw all that away by specifying to use bootstrap?

If I were to not use the --css flag, and then add in Bootstrap after the fact...would there be a downside to that? Could I use ImportMap's to do that?

I'm also unsure if using ImportMaps and esbuild together makes sense, or if that is not necessary. I'm still learning the lay of this new land.

0 Answers
Related