Browse Source

webpack优化

liting2017 6 years ago
parent
commit
8ca8cd6aa5
1 changed files with 4 additions and 4 deletions
  1. 4 4
      webpack.config.js

+ 4 - 4
webpack.config.js

@@ -19,8 +19,8 @@ module.exports = (function () {
     let plugins = [
         new webpack.optimize.CommonsChunkPlugin({
             name: 'vendors',
-            filename: "[name].js",
-            minChunks: Infinity
+            
+            // minChunks: Infinity
         }),
         new ExtractTextPlugin({
             filename: "[name].css",
@@ -35,13 +35,13 @@ module.exports = (function () {
             title: '首页',
             filename: 'html/index.html',
             template: './template/index.html',
-            chunks: ['index', 'vendors']
+            chunks: ['vendors','index' ]
         }),
         new HtmlWebpackPlugin({
             title: '搜索页',
             filename: 'html/index.html',
             template: './template/search.html',
-            chunks: ['search', 'vendors']
+            chunks: ['vendors','search']
         }),
         // new HtmlWebpackPlugin({
         //     title: '支付跳转页面',