diff --git a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-0.input.js b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-0.input.js index 8c607b8bf07..f66ded553e9 100644 --- a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-0.input.js +++ b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-0.input.js @@ -1,8 +1,8 @@ module.export = { - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ - names: ["common", "vendor"], + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ + names: ["common", "vendor"], minChunks: 2 - }) - ] + }) + ] } diff --git a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-1.input.js b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-1.input.js index deb6b344542..63202321e4f 100644 --- a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-1.input.js +++ b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-1.input.js @@ -1,7 +1,7 @@ module.export = { - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ - names: ["common", "vendor"] - }) - ] + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ + names: ["common", "vendor"] + }) + ] } diff --git a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-2.input.js b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-2.input.js index 110e4232bf0..783778fc416 100644 --- a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-2.input.js +++ b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-2.input.js @@ -1,7 +1,7 @@ module.export = { - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ - names: ["vendor"] - }) - ] + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ + names: ["vendor"] + }) + ] } diff --git a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-3.input.js b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-3.input.js index 49b19719fbe..b6852ef4efc 100644 --- a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-3.input.js +++ b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-3.input.js @@ -1,8 +1,8 @@ module.export = { - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ filename: "commons.js", name: "commons" }) - ] + ] } diff --git a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-4.input.js b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-4.input.js index 5f28279038c..48428ca18c4 100644 --- a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-4.input.js +++ b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-4.input.js @@ -1,10 +1,10 @@ module.export = { - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ name: "main", - async: true, - minSize: 0, - minChunks: 2 + async: true, + minSize: 0, + minChunks: 2 }) - ] + ] } diff --git a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-5.input.js b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-5.input.js index aa218de9a95..9b1ab0e7592 100644 --- a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-5.input.js +++ b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-5.input.js @@ -1,7 +1,7 @@ module.export = { - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ names: ["main", "runtime"], }) - ] + ] } diff --git a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-6.input.js b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-6.input.js index 2a5988ee20f..7554f9eb8ef 100644 --- a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-6.input.js +++ b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-6.input.js @@ -1,6 +1,6 @@ module.export = { - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ name: "main", minChunks: ({ resource }) => /node_modules/.test(resource), minChunks: ({ resource }) => { @@ -22,5 +22,5 @@ module.export = { } } }) - ] + ] } diff --git a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-7.input.js b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-7.input.js index eb7578de976..6ebf70ef678 100644 --- a/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-7.input.js +++ b/packages/migrate/commonsChunkPlugin/__testfixtures__/commonsChunkPlugin-7.input.js @@ -1,11 +1,8 @@ module.export = { - plugins: [ - new webpack.optimize.CommonsChunkPlugin({ + plugins: [ + new webpack.optimize.CommonsChunkPlugin({ names: ["main", "vendor"], minChunks: Infinity, - }), - // new webpack.optimize.CommonsChunkPlugin({ - // name: "vendor", - // }), - ] + }) + ] } diff --git a/packages/migrate/commonsChunkPlugin/commonsChunkPlugin.test.js b/packages/migrate/commonsChunkPlugin/commonsChunkPlugin.test.js index 9d3e3a96d0a..f1d540e76a1 100644 --- a/packages/migrate/commonsChunkPlugin/commonsChunkPlugin.test.js +++ b/packages/migrate/commonsChunkPlugin/commonsChunkPlugin.test.js @@ -6,7 +6,7 @@ defineTest(__dirname, "commonsChunkPlugin", "commonsChunkPlugin-0"); defineTest(__dirname, "commonsChunkPlugin", "commonsChunkPlugin-1"); defineTest(__dirname, "commonsChunkPlugin", "commonsChunkPlugin-2"); defineTest(__dirname, "commonsChunkPlugin", "commonsChunkPlugin-3"); -defineTest(__dirname, "commonsChunkPlugin", "commonsChunkPlugin-4"); // todo fix async case +defineTest(__dirname, "commonsChunkPlugin", "commonsChunkPlugin-4"); defineTest(__dirname, "commonsChunkPlugin", "commonsChunkPlugin-5"); defineTest(__dirname, "commonsChunkPlugin", "commonsChunkPlugin-6"); defineTest(__dirname, "commonsChunkPlugin", "commonsChunkPlugin-7");