mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
refactor: obselete AggressiveSplittingPlugin
This commit is contained in:
parent
22a53464a7
commit
9afd6a55dd
@ -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'
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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,
|
||||||
|
1
test/fixtures/with-config/nuxt.config.js
vendored
1
test/fixtures/with-config/nuxt.config.js
vendored
@ -45,7 +45,6 @@ export default {
|
|||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
publicPath: '/orion/',
|
publicPath: '/orion/',
|
||||||
maxChunkSize: 300000,
|
|
||||||
cssSourceMap: true,
|
cssSourceMap: true,
|
||||||
parallel: true,
|
parallel: true,
|
||||||
analyze: {
|
analyze: {
|
||||||
|
Loading…
Reference in New Issue
Block a user