3

i really just started learning webpack. and i use rails. i want to use webpack to managed my javascript library. so i found @justing808 ’s justin808/react-webpack-rails-tutorial.

follow his guide, install bootstrap-sass-loader, and add entry point and add loader.

it look like bootstrap javascript was loaded. but i don’t know how to import scss.in origin rails project, i place scss file in app/assets/stylesheets folder. but webpack will package all the files in app/assets/javascripts/client

somebody could tell me how to import bootstrap in origin rails project’s scss file?

i can load it like this: ../../node_modules/bootstrap-sass/assets/bootstrap/, looks so bad. and not right, yes?

if i do this the glyphs 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
GeminiYellow
  • 1,016
  • 2
  • 12
  • 34

1 Answers1

0

you probably need file-loader as well as url-loader in order to correctly load fonts etc.

bboydflo
  • 907
  • 1
  • 15
  • 24