I have an app that uses Webpack. I'm new to Webpack and trying to learn how to use it effectively. Specifically, I'm trying to import Bootstrap with Font Awesome into my project. I found this SO post, however, I am still unable to use Bootstrap. I'm not sure if it's out-of-date, or if I'm misunderstanding something.
I tried loading Bootstrap and Font Awesome via the url-loader. I was referencing the following URLs:
https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.min.css
https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css
I also tried using loading Bootstrap and Font Awesome via NPM and then referencing it in my entry file like this:
require('bootstrap');
require('font-awesome');
It seems like this should be part of a commonly used template. However, I'm not finding one. How do I use Bootstrap and Font Awesome with Webpack?
However, I've come up short with that approach as well.
require('bootstrap'); require('font-awesome');in entry file? Do you have any errors? Can you add webpack config file?require('bootstrap');the bootstrap CSS simply does not load. I installed bootstrap usingnpm install bootstrap --save-dev. I can seebootstrapin thenode_modulesdirectory. I can successfully runwebpackfrom the command-line withrequire('bootstrap')in my entry-file. However, the CSS simply is not loaded when I visit the web page.css-loaderandurl-loaderin my config file. However, I do not see any font-specific loaders listed in the loaders: webpack.js.org/loaders.node_modulesand you should be able to import or require them.