call forGenerate before modules ready

This commit is contained in:
Pooya Parsa 2017-08-18 17:57:58 +04:30
parent d589bc5819
commit 7feeedd432

View File

@ -26,12 +26,14 @@ export default class Generator extends Tapable {
const s = Date.now()
let errors = []
// Add flag to set process.generate
this.builder.forGenerate()
// Wait for nuxt be ready
await this.nuxt.ready()
// Start build process
if (build) {
this.builder.forGenerate() // Add flag to set process.generate
await this.builder.build()
}