mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
fix: always add commonChunksPlugin
This commit is contained in:
parent
0198a184b8
commit
a23fb18399
@ -31,6 +31,9 @@ export default function webpackClientConfig() {
|
||||
config.entry.app = resolve(this.options.buildDir, 'client.js')
|
||||
config.entry.vendor = this.vendor()
|
||||
|
||||
// Add CommonChunks plugin
|
||||
commonChunksPlugin.call(this, config)
|
||||
|
||||
// Env object defined in nuxt.config.js
|
||||
let env = {}
|
||||
each(this.options.env, (value, key) => {
|
||||
@ -123,9 +126,6 @@ export default function webpackClientConfig() {
|
||||
// Production specific config
|
||||
// --------------------------------------
|
||||
if (!this.options.dev) {
|
||||
// Add CommonChunks plugin
|
||||
commonChunksPlugin.call(this, config)
|
||||
|
||||
// Scope Hoisting
|
||||
if (this.options.build.scopeHoisting === true) {
|
||||
config.plugins.push(new webpack.optimize.ModuleConcatenationPlugin())
|
||||
|
Loading…
Reference in New Issue
Block a user