mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +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
|
||||
})
|
||||
)
|
||||
|
||||
// Scope Hoisting
|
||||
// config.plugins.push(
|
||||
// new webpack.optimize.ModuleConcatenationPlugin()
|
||||
// )
|
||||
}
|
||||
|
||||
// Clone deep avoid leaking config between Client and Server
|
||||
|
@ -135,6 +135,14 @@ export default function webpackClientConfig () {
|
||||
// Production specific config
|
||||
// --------------------------------------
|
||||
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
|
||||
config.plugins.push(
|
||||
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
|
||||
if (this.options.build.analyze) {
|
||||
config.plugins.push(
|
||||
|
Loading…
Reference in New Issue
Block a user