This repository was archived by the owner on May 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +28
-12
lines changed
test/cases/order-undefined-error Expand file tree Collapse file tree 3 files changed +28
-12
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ new ExtractTextPlugin(options: filename | object)
6868| ** ` filename ` ** | ` {String} ` | Name of the result file. May contain ` [name] ` , ` [id] ` and ` [contenthash] ` |
6969| ** ` options.allChunks ` ** | ` {Boolean} ` | Extract from all additional chunks too (by default it extracts only from the initial chunk(s))|
7070| ** ` options.disable ` ** | ` {Boolean} ` | Disables the plugin|
71+ | ** ` options.ignoreOrder ` ** | ` {Boolean} ` | Disables order check (useful for CSS Modules!), ` false ` by default|
7172
7273* ` [name] ` name of the chunk
7374* ` [id] ` number of the chunk
Original file line number Diff line number Diff line change 2323 "description" : " The filename and path that ExtractTextPlugin will extract to" ,
2424 "type" : " string"
2525 },
26+ "ignoreOrder" : {
27+ "description" : " Ignore dependency order (useful for CSS Modules)" ,
28+ "type" : " boolean"
29+ },
2630 "loader" : {
2731 "description" : " The loader that ExtractTextPlugin will attempt to load through." ,
2832 "modes" : {
Original file line number Diff line number Diff line change 11var ExtractTextPlugin = require ( "../../../" ) ;
22module . exports = {
3- entry : "./index.js" ,
4- module : {
5- loaders : [ {
6- test : / \. c s s $ / ,
7- loader : ExtractTextPlugin . extract ( 'style' , 'css?modules' )
8- } ]
9- } ,
10- plugins : [
11- new ExtractTextPlugin ( 'file.css' , {
12- ignoreOrder : true
13- } )
14- ]
3+ entry : "./index.js" ,
4+ module : {
5+ loaders : [
6+ {
7+ test : / \. c s s $ / ,
8+ use : ExtractTextPlugin . extract ( {
9+ fallback : 'style-loader' ,
10+ use : {
11+ loader : 'css-loader' ,
12+ options : {
13+ modules : true
14+ }
15+ }
16+ } )
17+ }
18+ ]
19+ } ,
20+ plugins : [
21+ new ExtractTextPlugin ( {
22+ filename : 'file.css' ,
23+ ignoreOrder : true
24+ } )
25+ ]
1526}
You can’t perform that action at this time.
0 commit comments