Let's say that we start with the following starter pack: https://github.com/angularclass/angular2-webpack-starter
After npm install
and npm run start
everything works fine.
I want to add an external css module, for example bootstrap 4's css (and only the css). (I know that bootstrap has a bootstrap-loader, but now I'm asking for general solution, so please think about bootstrap 4 here as it could be any other css module that is available via npm).
I install bootstrap via npm: npm install [email protected] --save
First I thought that it is enough to add import 'bootstrap/dist/css/bootstrap.css';
to the vendor.browser.ts file.
But it isn't.
What should I do to have a proper solution?
Solutions I'm NOT asking for:
- "Copy the external css module to the assets folder, and use it from there"
- I'm looking for a solution that works together with npm package.
- "Use bootstrap-loader for webpack"
- As I described above, I'm looking for a general solution, bootstrap is only an example here.
- "Use another stack"
- I'm looking for a solution in the exact starter pack that I've mentioned above.