Fix sorting for webpack2
This commit is contained in:
parent
831cbdecb8
commit
fab60bed44
|
|
@ -81,3 +81,10 @@ module.exports.none = function (chunks) {
|
|||
* Defines the default sorter.
|
||||
*/
|
||||
module.exports.auto = module.exports.id;
|
||||
|
||||
// In webpack 2 the ids are fliped around.
|
||||
// Therefore the id sort is broken
|
||||
// Luckily the dependency sort is working as expected
|
||||
if (require('webpack/package.json').version.split('.')[0] === '2') {
|
||||
module.exports.auto = module.exports.dependency;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue