Lost with using adding Bootstrap in Rails 6? Don’t worry this should get you on the right track FAST.
Webpack is a separate compiler from the previous Rails 4/5 sprockets compiler. Given Rails 6 using webpack compiles.. adding Bootstrap 4.5 to Rails 6 should be done/compiled via webpack
This will add bootstrap jquery and popper in
/node_modules folder as well as saving it to
This will add jquery and popper asa
global variables.. which is required by bootstrap
.scss and add:
Make sure you have this in your
views/layouts/application.html head tag which will load the
In this file
You have both the scss and js files loaded and you can extend with customizing/making your own custom bootstrap theme on rails 6.