File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -320,7 +320,12 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
320
320
compilation . plugin ( "additional-assets" , function ( callback ) {
321
321
extractedChunks . forEach ( function ( extractedChunk ) {
322
322
if ( extractedChunk . modules . length ) {
323
- extractedChunk . modules . sort ( function ( a , b ) {
323
+ // HACK: Fix the CSS ordering issue present in 2.1.2 without needing to move to
324
+ // version 3.0.0 which breaks reloading in webpack-dev-server.
325
+ // See:
326
+ // https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/548
327
+ // https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/579
328
+ extractedChunk . modules = extractedChunk . modules . sort ( function ( a , b ) {
324
329
if ( ! options . ignoreOrder && isInvalidOrder ( a , b ) ) {
325
330
compilation . errors . push ( new OrderUndefinedError ( a . getOriginalModule ( ) ) ) ;
326
331
compilation . errors . push ( new OrderUndefinedError ( b . getOriginalModule ( ) ) ) ;
@@ -337,7 +342,7 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
337
342
} ) ;
338
343
339
344
var file = ( isFunction ( filename ) ) ? filename ( getPath ) : getPath ( filename ) ;
340
-
345
+
341
346
compilation . assets [ file ] = source ;
342
347
chunk . files . push ( file ) ;
343
348
}
You can’t perform that action at this time.
0 commit comments