mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-12 03:38:07 +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.app = resolve(this.options.buildDir, 'client.js')
|
||||||
config.entry.vendor = this.vendor()
|
config.entry.vendor = this.vendor()
|
||||||
|
|
||||||
|
// Add CommonChunks plugin
|
||||||
|
commonChunksPlugin.call(this, config)
|
||||||
|
|
||||||
// Env object defined in nuxt.config.js
|
// Env object defined in nuxt.config.js
|
||||||
let env = {}
|
let env = {}
|
||||||
each(this.options.env, (value, key) => {
|
each(this.options.env, (value, key) => {
|
||||||
@ -123,9 +126,6 @@ export default function webpackClientConfig() {
|
|||||||
// Production specific config
|
// Production specific config
|
||||||
// --------------------------------------
|
// --------------------------------------
|
||||||
if (!this.options.dev) {
|
if (!this.options.dev) {
|
||||||
// Add CommonChunks plugin
|
|
||||||
commonChunksPlugin.call(this, config)
|
|
||||||
|
|
||||||
// Scope Hoisting
|
// Scope Hoisting
|
||||||
if (this.options.build.scopeHoisting === true) {
|
if (this.options.build.scopeHoisting === true) {
|
||||||
config.plugins.push(new webpack.optimize.ModuleConcatenationPlugin())
|
config.plugins.push(new webpack.optimize.ModuleConcatenationPlugin())
|
||||||
|
Loading…
Reference in New Issue
Block a user