competitions
杨树明 6 years ago
parent 9bc8c91d38
commit e453701805

@ -67,8 +67,8 @@ module.exports = {
entry: {
main:[require.resolve('./polyfills'), paths.appIndexJs],
vendor: [
'moment', 'react', 'react-dom','react-router-dom','antd','@icedesign/base','@novnc/novnc','array-flatten','axios',
'material-ui','monaco-editor','react-monaco-editor', 'echarts',"qs"
'moment', 'react', 'react-dom','react-router-dom','react-router','antd','@icedesign/base','@novnc/novnc','axios',
'material-ui','echarts','qs',
],
},
output: {
@ -276,29 +276,35 @@ module.exports = {
// 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.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({
async: 'async-vendor',
deepChildren: true,
minChunks: (module) => {
return /node_modules/.test(module.context);
},
name: ['vendor'],
filename: '[name].js',
minChunks: Infinity
}),
new webpack.optimize.CommonsChunkPlugin({
children: true,
async: 'children-async'
}),
new webpack.optimize.CommonsChunkPlugin(
{names: ["vendors", "webpackAssets",'moment', 'react', 'react-dom','react-router-dom','antd','@icedesign/base','@novnc/novnc','array-flatten','axios',
'material-ui','monaco-editor','react-monaco-editor', 'echarts',"qs"]}
),
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: (module) => {
return /node_modules/.test(module.context);
},
chunks: Infinity,
}),
// Generates an `index.html` file with the <script> injected.
new HtmlWebpackPlugin({
inject: true,
@ -347,8 +353,7 @@ module.exports = {
cacheDir: '.cache/',
uglifyJS:{
output: {
beautify: true,
comments: true,
comments: false,
},
warnings: false,
compress: {

Loading…
Cancel
Save