How to use sass loader with webpack 4? I read a lot about this and most sites recomended to use ExtractTextPlugin, but ExtractTextPlugin doesn\'t work with webpack 4.
I
webpack
4 is not yet capable of outputting standalone *.css
file on its own. To get a separate *.css
file, you need to use the extract-text-webpack-plugin to pull out all the CSS into its own entry chunk. This is a good tutorial.
You can use mini-css-extract-plugin.
https://github.com/webpack-contrib/mini-css-extract-plugin
I used the same plugin for extracting SASS to CSS using webpack 4 and it's working like a charm.
The beta works well with webpack@4.13.0
npm install extract-text-webpack-plugin@next