refactor: obselete AggressiveSplittingPlugin

This commit is contained in:
Clark Du 2018-07-17 12:13:06 +01:00
parent 22a53464a7
commit 9afd6a55dd
No known key found for this signature in database
GPG Key ID: 32CBD8CD478AF898
4 changed files with 1 additions and 17 deletions

View File

@ -6,9 +6,6 @@ export default {
{ name: 'viewport', content: 'width=device-width, initial-scale=1' } { name: 'viewport', content: 'width=device-width, initial-scale=1' }
] ]
}, },
build: {
maxChunkSize: 300000
},
env: { env: {
githubToken: '42cdf9fd55abf41d24f34c0f8a4d9ada5f9e9b93' githubToken: '42cdf9fd55abf41d24f34c0f8a4d9ada5f9e9b93'
} }

View File

@ -57,17 +57,6 @@ export default class WebpackClientConfig extends WebpackBaseConfig {
plugins.push(new webpack.HotModuleReplacementPlugin()) plugins.push(new webpack.HotModuleReplacementPlugin())
} }
// Chunks size limit
// https://webpack.js.org/plugins/aggressive-splitting-plugin/
if (!this.options.dev && this.options.build.maxChunkSize) {
plugins.push(
new webpack.optimize.AggressiveSplittingPlugin({
minSize: this.options.build.maxChunkSize,
maxSize: this.options.build.maxChunkSize
})
)
}
// Webpack Bundle Analyzer // Webpack Bundle Analyzer
// https://github.com/webpack-contrib/webpack-bundle-analyzer // https://github.com/webpack-contrib/webpack-bundle-analyzer
if (!this.options.dev && this.options.build.analyze) { if (!this.options.dev && this.options.build.analyze) {
@ -105,7 +94,7 @@ export default class WebpackClientConfig extends WebpackBaseConfig {
test: /node_modules[\\/](vue|vue-loader|vue-router|vuex|vue-meta|core-js|babel-runtime|es6-promise|axios|webpack|setimmediate|timers-browserify|process|regenerator-runtime|cookie|js-cookie|is-buffer|dotprop|nuxt\.js)[\\/]/, test: /node_modules[\\/](vue|vue-loader|vue-router|vuex|vue-meta|core-js|babel-runtime|es6-promise|axios|webpack|setimmediate|timers-browserify|process|regenerator-runtime|cookie|js-cookie|is-buffer|dotprop|nuxt\.js)[\\/]/,
chunks: 'all', chunks: 'all',
priority: 10, priority: 10,
name: 'commons' name: true
} }
} }

View File

@ -31,7 +31,6 @@ export default {
build: { build: {
analyze: false, analyze: false,
profile: process.argv.includes('--profile'), profile: process.argv.includes('--profile'),
maxChunkSize: false,
extractCSS: false, extractCSS: false,
cssSourceMap: undefined, cssSourceMap: undefined,
ssr: undefined, ssr: undefined,

View File

@ -45,7 +45,6 @@ export default {
}, },
build: { build: {
publicPath: '/orion/', publicPath: '/orion/',
maxChunkSize: 300000,
cssSourceMap: true, cssSourceMap: true,
parallel: true, parallel: true,
analyze: { analyze: {