File tree 3 files changed +28
-12
lines changed
test/cases/order-undefined-error
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)
68
68
| ** ` filename ` ** | ` {String} ` | Name of the result file. May contain ` [name] ` , ` [id] ` and ` [contenthash] ` |
69
69
| ** ` options.allChunks ` ** | ` {Boolean} ` | Extract from all additional chunks too (by default it extracts only from the initial chunk(s))|
70
70
| ** ` options.disable ` ** | ` {Boolean} ` | Disables the plugin|
71
+ | ** ` options.ignoreOrder ` ** | ` {Boolean} ` | Disables order check (useful for CSS Modules!), ` false ` by default|
71
72
72
73
* ` [name] ` name of the chunk
73
74
* ` [id] ` number of the chunk
Original file line number Diff line number Diff line change 23
23
"description" : " The filename and path that ExtractTextPlugin will extract to" ,
24
24
"type" : " string"
25
25
},
26
+ "ignoreOrder" : {
27
+ "description" : " Ignore dependency order (useful for CSS Modules)" ,
28
+ "type" : " boolean"
29
+ },
26
30
"loader" : {
27
31
"description" : " The loader that ExtractTextPlugin will attempt to load through." ,
28
32
"modes" : {
Original file line number Diff line number Diff line change 1
1
var ExtractTextPlugin = require ( "../../../" ) ;
2
2
module . 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
+ ]
15
26
}
You can’t perform that action at this time.
0 commit comments