There is a webpack-simple template, I want to connect css by:

import 'my-package/lib/theme-default/index.css' 

in webpack.config.js added:

 { test: /\.css$/, loader: 'style-loader!css-loader' }, 

When starting, it writes that the style-loader module was not found:

 ERROR in ./src/main.js Module not found: Error: Can't resolve 'style-loader' in .... 

Tell me how to put it, I saw there is still some kind of vue-style-loader. just installed npm install vue-style-loader - save - gave nothing

  • thanks, all worked well! - Alexander
  • did comment reply - Duck Learns to Take Cover

1 answer 1

Because you need to install the style-loader itself and not the vue style loader. that is, run the command npm install style-loader --save-dev

And you only need it at the preprocessing stage, so --save-dev and not --save