bower-webpack-plugin icon indicating copy to clipboard operation
bower-webpack-plugin copied to clipboard

Example missing css

Open MatthewCarrington opened this issue 9 years ago • 2 comments

The example needs to add the Bootstrap CSS to work correctly. Adding ...

require("./bower_components/bootstrap/dist/css/bootstrap.min.css");

... to entry.js seems to fix it.

Also the specified index.html has 'Bowerk Webpack Plugin' instead of 'Bower Webpack Plugin'

Hope that helps.

MatthewCarrington avatar Oct 14 '15 10:10 MatthewCarrington

This is due to changes in bower.json in recent versions of bootstrap (>= 3.3.5). "main" file section no more declares all the files needed by this plugin, according to the new bower spec (see this note and bower/spec#43). In addition to @MatthewCarrington solution you may either

  • install a working bootstrap version: bower install bootstrap#3.3.4
  • or use the less-loader:
    • npm install less-loader --save-dev
    • modify webpack config accordingly.

lbragaglia avatar Mar 07 '16 00:03 lbragaglia

For other user's using @lbragaglia's solution. If you decide to add the less loader than you need the less module as well: npm install less --save-dev

dagumak avatar Jul 18 '16 08:07 dagumak