mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
builder: decouple build from production logic
This commit is contained in:
parent
5768ef5092
commit
4c07a397e2
@ -119,10 +119,6 @@ export default class Builder extends Tapable {
|
||||
}
|
||||
|
||||
async production () {
|
||||
// Avoid calling this method multiple times
|
||||
if (this._buildStatus === STATUS.BUILD_DONE) {
|
||||
return this
|
||||
}
|
||||
// Production, create server-renderer
|
||||
const serverConfig = this.getWebpackServerConfig()
|
||||
const bundlePath = join(serverConfig.output.path, 'server-bundle.json')
|
||||
@ -135,7 +131,6 @@ export default class Builder extends Tapable {
|
||||
const manifest = fs.readFileSync(manifestPath, 'utf8')
|
||||
this.createRenderer(JSON.parse(bundle), JSON.parse(manifest))
|
||||
this.addAppTemplate()
|
||||
this._buildStatus = STATUS.BUILD_DONE
|
||||
return this
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user