I’m very late to this - but I have to disagree about ‘just works’ I spent many hours trying to add jQuery and Bootstrap to a rails project
there are a bunch of tutorials - many of which give a half-working experience.
(in my case, stuff worked in ujs and console, but not my included js. I didn’t even realise it was half broken until several days into using it)
I don’t know if it is plausible - but for me, what I would like to see would be a js equivalent of bundler
#yarnbundefile.rb
yarnbundle 'jquery' [optionally some version info]
yarnbundle 'bootstrap'
yarnbundle install … and magically it all works
at the moment, I think the process is
- yarn install
- google how to include in environment.js (it seems to be different for each library)
- require (or import?) in application.js
- (sometimes) require (or import?) in application.js
thanks