From a7bf7c05d526856ac847bbe0f5a8426c449cf94f Mon Sep 17 00:00:00 2001 From: Vishal Sharma Date: Sun, 26 Aug 2018 03:24:32 +0530 Subject: [PATCH] docs(readme): add suggestion for `mini-css-extract-plugin` (#597) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ce95e25d..d627aee0 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@

Loads a Sass/SCSS file and compiles it to CSS.

-Use the [css-loader](https://github.com/webpack-contrib/css-loader) or the [raw-loader](https://github.com/webpack-contrib/raw-loader) to turn it into a JS module and the [MiniCssExtractPlugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to extract it into a separate file. +Use the [css-loader](https://github.com/webpack-contrib/css-loader) or the [raw-loader](https://github.com/webpack-contrib/raw-loader) to turn it into a JS module and the [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) to extract it into a separate file. Looking for the webpack 1 loader? Check out the [archive/webpack-1 branch](https://github.com/webpack-contrib/sass-loader/tree/archive/webpack-1).

Install

@@ -136,7 +136,7 @@ module.exports = { ### In production -Usually, it's recommended to extract the style sheets into a dedicated file in production using the [MiniCssExtractPlugin](https://github.com/webpack-contrib/mini-css-extract-plugin). This way your styles are not dependent on JavaScript: +Usually, it's recommended to extract the style sheets into a dedicated file in production using the [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin). This way your styles are not dependent on JavaScript: ```js const MiniCssExtractPlugin = require("mini-css-extract-plugin"); @@ -196,7 +196,7 @@ Bundling CSS with webpack has some nice advantages like referencing images and f There are two possibilities to extract a style sheet from the bundle: - [extract-loader](https://github.com/peerigon/extract-loader) (simpler, but specialized on the css-loader's output) -- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) (more complex, but works in all use-cases) +- [mini-css-extract-plugin](https://github.com/webpack-contrib/mini-css-extract-plugin) (use this, when using webpack 4 configuration. Works in all use-cases) ### Source maps