Add extend option in nuxt build config

This commit is contained in:
Sébastien Chopin 2016-12-27 14:54:10 +01:00
parent a4c28ac52b
commit a9cb000b76
2 changed files with 14 additions and 1 deletions

View File

@ -72,5 +72,12 @@ module.exports = function () {
})
)
}
// Extend config
if (typeof this.options.build.extend === 'function') {
this.options.build.extend(config, {
dev: this.dev,
isClient: true
})
}
return config
}

View File

@ -51,6 +51,12 @@ module.exports = function () {
}
config.externals = uniq(config.externals)
// Return config
// Extend config
if (typeof this.options.build.extend === 'function') {
this.options.build.extend(config, {
dev: this.dev,
isServer: true
})
}
return config
}