mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-31 07:40:33 +00:00
enable ModuleConcatenationPlugin for client bundles
This commit is contained in:
parent
8266f717b9
commit
e0782af53e
@ -142,11 +142,6 @@ export default function webpackBaseConfig ({ isClient, isServer }) {
|
|||||||
minimize: true
|
minimize: true
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
// Scope Hoisting
|
|
||||||
// config.plugins.push(
|
|
||||||
// new webpack.optimize.ModuleConcatenationPlugin()
|
|
||||||
// )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clone deep avoid leaking config between Client and Server
|
// Clone deep avoid leaking config between Client and Server
|
||||||
|
@ -135,6 +135,14 @@ export default function webpackClientConfig () {
|
|||||||
// Production specific config
|
// Production specific config
|
||||||
// --------------------------------------
|
// --------------------------------------
|
||||||
if (!this.options.dev) {
|
if (!this.options.dev) {
|
||||||
|
// Scope Hoisting
|
||||||
|
config.plugins.push(
|
||||||
|
new webpack.optimize.ModuleConcatenationPlugin()
|
||||||
|
)
|
||||||
|
|
||||||
|
// https://webpack.js.org/plugins/hashed-module-ids-plugin
|
||||||
|
config.plugins.push(new webpack.HashedModuleIdsPlugin())
|
||||||
|
|
||||||
// Minify JS
|
// Minify JS
|
||||||
config.plugins.push(
|
config.plugins.push(
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
@ -145,9 +153,6 @@ export default function webpackClientConfig () {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
// https://webpack.js.org/plugins/hashed-module-ids-plugin
|
|
||||||
config.plugins.push(new webpack.HashedModuleIdsPlugin())
|
|
||||||
|
|
||||||
// Webpack Bundle Analyzer
|
// Webpack Bundle Analyzer
|
||||||
if (this.options.build.analyze) {
|
if (this.options.build.analyze) {
|
||||||
config.plugins.push(
|
config.plugins.push(
|
||||||
|
Loading…
Reference in New Issue
Block a user