Skip to content

Commit a7bf7c0

Browse files
Vishal0203michael-ciniawsky
authored andcommitted
docs(readme): add suggestion for mini-css-extract-plugin (#597)
1 parent f4bdcfe commit a7bf7c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<p>Loads a Sass/SCSS file and compiles it to CSS.</p>
1919
</div>
2020

21-
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.
21+
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.
2222
Looking for the webpack 1 loader? Check out the [archive/webpack-1 branch](https://github.com/webpack-contrib/sass-loader/tree/archive/webpack-1).
2323

2424
<h2 align="center">Install</h2>
@@ -136,7 +136,7 @@ module.exports = {
136136

137137
### In production
138138

139-
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:
139+
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:
140140

141141
```js
142142
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
@@ -196,7 +196,7 @@ Bundling CSS with webpack has some nice advantages like referencing images and f
196196
There are two possibilities to extract a style sheet from the bundle:
197197

198198
- [extract-loader](https://github.com/peerigon/extract-loader) (simpler, but specialized on the css-loader's output)
199-
- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) (more complex, but works in all use-cases)
199+
- [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)
200200

201201
### Source maps
202202

0 commit comments

Comments
 (0)