How to use webpack bootstrap and bootstrap-sass-loader in rails
I really just started learning webpack
. and I am using rails
. I want to use webpack
to manage my library javascript
. so i found @ justing808 s justin808/react-webpack-rails-tutorial
.
follow its guide, install bootstrap-sass-loader
and add entry
point and add loader
.
it looks like bootstrap
javascript loaded. but i dont know how to import scss
.in origin rails project , i place scss file in folder app/assets/stylesheets
. but webpack
will pack all files intoapp/assets/javascripts/client
Can anyone tell me how to import the bootstrap file into the original rails file scils project?
I can load it like this: ../../node_modules/bootstrap-sass/assets/bootstrap/
looks so bad. and not right, right?
if I do this, glyphs
it cannot be loaded. and i got some warning
Failed to decode downloaded font: http://localhost:5000/a/448c34a56d699c29117adc64c43affeb.woff2
Failed to decode downloaded font: http://localhost:5000/a/fa2772327f55d8198301fdb8bcfc8158.woff
Failed to decode downloaded font: http://localhost:5000/a/e18bbf611f2a2e43afc071aa2f4e1512.ttf
source to share