liting2017 6 years ago
parent
commit
09bf2288d1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      webpack.config.js

+ 3 - 3
webpack.config.js

@@ -19,8 +19,7 @@ module.exports = (function () {
     let plugins = [
         new webpack.optimize.CommonsChunkPlugin({
             name: 'vendors',
-            
-            // minChunks: Infinity
+            minChunks: 4
         }),
         new ExtractTextPlugin({
             filename: "[name].css",
@@ -35,7 +34,8 @@ module.exports = (function () {
             title: '首页',
             filename: 'html/index.html',
             template: './template/index.html',
-            chunks: ['vendors','index' ]
+            chunks: ['vendors','index' ],
+            chunksSortMode:"dependency"
         }),
         new HtmlWebpackPlugin({
             title: '搜索页',