fix: always add commonChunksPlugin

This commit is contained in:
Pooya Parsa 2017-11-11 01:16:37 +03:30
parent 0198a184b8
commit a23fb18399
No known key found for this signature in database
GPG Key ID: C3C77C557D8883CD
1 changed files with 3 additions and 3 deletions

View File

@ -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())