1414 <p >desc</p >
1515</div >
1616
17+ This plugin extract CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS.
18+
19+ It builds on top of a new webpack v4 feature (module types) and requires webpack 4 to work.
20+
21+ Compared to the extract-text-webpack-plugin:
22+
23+ * Async loading
24+ * No duplicate compilation (performance)
25+ * Easier to use
26+ * Specific to CSS
27+
1728<h2 align =" center " >Install</h2 >
1829
1930``` bash
@@ -22,72 +33,41 @@ npm install --save-dev mini-css-extract-plugin
2233
2334<h2 align =" center " >Usage</h2 >
2435
25- ### Lorem
26-
27- Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
28-
29- <h2 align =" center " >Examples</h2 >
36+ ### Configuration
3037
3138** webpack.config.js**
3239
3340``` js
34- // Loader/plugin setup here..
35- ```
36-
37- ** file.ext**
38-
39- ``` js
40- // Source code here...
41- ```
42-
43- ** bundle.js**
44-
45- ``` js
46- require (" mini-css-extract-plugin!./file.EXT" );
47-
48- // Bundle code here...
41+ const MiniCssExtractPlugin = require (" mini-css-extract-plugin" );
42+ module .exports = {
43+ plugins: [
44+ new MiniCssExtractPlugin ({
45+ filename: " [name].css" ,
46+ chunkFilename: " [id].css"
47+ })
48+ ],
49+ module: {
50+ rules: [
51+ {
52+ test: / \. css$ / ,
53+ use: [
54+ MiniCssExtractPlugin .loader ,
55+ " css-loader"
56+ ]
57+ }
58+ ]
59+ }
60+ }
4961```
5062
5163<h2 align =" center " >Maintainers</h2 >
5264
53- ``` bash
54- https://api.github.com/users/MAINTAINER
55- ```
56-
5765<table >
5866 <tbody >
5967 <tr>
6068 <td align="center">
61- <a href="https://github.com/">
62- <img width="150" height="150" src="https://avatars.githubusercontent.com/u/5419992?v=3&s=150">
63- </br>
64- Name
65- </a>
66- </td>
67- <td align="center">
68- <a href="https://github.com/">
69- <img width="150" height="150" src="https://avatars.githubusercontent.com/u/5419992?v=3&s=150">
70- </br>
71- Name
72- </a>
73- </td>
74- <td align="center">
75- <a href="https://github.com/">
76- <img width="150" height="150" src="https://avatars.githubusercontent.com/u/5419992?v=3&s=150">
77- </br>
78- Name
79- </a>
80- </td>
81- <td align="center">
82- <a href="https://github.com/">
83- <img width="150" height="150" src="https://avatars.githubusercontent.com/u/5419992?v=3&s=150">
84- </br>
85- Name
86- </a>
87- </td>
88- <td align="center">
89- <a href="https://github.com/">
90- <img width="150" height="150" src="https://avatars.githubusercontent.com/u/5419992?v=3&s=150">
69+ <a href="https://github.com/sokra">
70+ <img width="150" height="150" src="https://github.com/sokra.png?size=150">
9171 </br>
9272 Name
9373 </a>
0 commit comments