From 3e0fc0c4d02cc068baf19455c24d9e3aaacd2a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 22 Oct 2019 15:04:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/config/webpack.config.prod.js | 46 ++-------------------- 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/public/react/config/webpack.config.prod.js b/public/react/config/webpack.config.prod.js index 68ef24814..886d97313 100644 --- a/public/react/config/webpack.config.prod.js +++ b/public/react/config/webpack.config.prod.js @@ -11,6 +11,7 @@ const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin'); const eslintFormatter = require('react-dev-utils/eslintFormatter'); const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin'); const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin'); + const paths = require('./paths'); const getClientEnvironment = require('./env'); @@ -61,16 +62,9 @@ module.exports = { // We generate sourcemaps in production. This is slow but gives good results. // You can exclude the *.map files from the build during deployment. // devtool: shouldUseSourceMap ? 'nosources-source-map' : false, //正式版 - devtool: false,//测试版 + devtool:false,//测试版 // In production, we only want to load the polyfills and the app code. - // entry: [require.resolve('./polyfills'), paths.appIndexJs], - entry: { - main:[require.resolve('./polyfills'), paths.appIndexJs], - vendor: [ - 'moment', 'react', 'react-dom','react-router-dom','react-router','antd','@icedesign/base','@novnc/novnc','axios', - 'material-ui','echarts','qs', - ], - }, + entry: [require.resolve('./polyfills'), paths.appIndexJs], output: { // The build folder. path: paths.appBuild, @@ -275,36 +269,6 @@ module.exports = { // In production, it will be an empty string unless you specify "homepage" // in `package.json`, in which case it will be the pathname of that URL. new InterpolateHtmlPlugin(env.raw), - new webpack.HashedModuleIdsPlugin(), - new webpack.optimize.DedupePlugin(), - new webpack.optimize.ModuleConcatenationPlugin(), - - // new webpack.optimize.CommonsChunkPlugin({ - // async: 'async-vendor', - // deepChildren: true, - // minChunks: (module) => { - // return /node_modules/.test(module.context); - // }, - // }), - - // new webpack.optimize.CommonsChunkPlugin( - // {names: 'vendor'} - // ), - // - - new webpack.optimize.CommonsChunkPlugin({ - name: ['vendor'], - filename: '[name].js', - minChunks: Infinity - }), - new webpack.optimize.CommonsChunkPlugin({ - children: true, - async: 'children-async' - }), - new webpack.optimize.CommonsChunkPlugin({ - name: 'manifest', - chunks: Infinity, - }), // Generates an `index.html` file with the