mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
Don't call extend for server if spa mode
This commit is contained in:
parent
ef4cdd4776
commit
88f98fb61d
@ -365,8 +365,9 @@ export default class Builder extends Tapable {
|
|||||||
compilersOptions.push(clientConfig)
|
compilersOptions.push(clientConfig)
|
||||||
|
|
||||||
// Server
|
// Server
|
||||||
const serverConfig = serverWebpackConfig.call(this)
|
let serverConfig = null
|
||||||
if (this.options.build.ssr) {
|
if (this.options.build.ssr) {
|
||||||
|
serverConfig = serverWebpackConfig.call(this)
|
||||||
compilersOptions.push(serverConfig)
|
compilersOptions.push(serverConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -380,7 +381,7 @@ export default class Builder extends Tapable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Server config
|
// Server config
|
||||||
if (!serverConfig.resolve.alias[p.name]) {
|
if (serverConfig && !serverConfig.resolve.alias[p.name]) {
|
||||||
// Alias to noop for ssr:false plugins
|
// Alias to noop for ssr:false plugins
|
||||||
serverConfig.resolve.alias[p.name] = p.ssr ? src : './empty.js'
|
serverConfig.resolve.alias[p.name] = p.ssr ? src : './empty.js'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user