Skip to content

Commit

Permalink
fix(builder): await for renderer to load resources (#5341)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 23, 2019
1 parent 95f2a12 commit caf5198
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vue-renderer/src/renderer.js
Expand Up @@ -140,7 +140,7 @@ export default class VueRenderer {
// Try once to load SSR resources from fs
await this.loadResources(fs)

// Without using `nuxt start` (Programmatic, Tests and Generate)
// Without using `nuxt start` (programmatic, tests and generate)
if (!this.context.options._start) {
this.context.nuxt.hook('build:resources', () => this.loadResources(fs))
return
Expand Down
3 changes: 3 additions & 0 deletions packages/webpack/src/builder.js
Expand Up @@ -173,6 +173,9 @@ export class WebpackBundler {
// Actual error will be printed by webpack
throw new Error('Nuxt Build Error')
}

// Await for renderer to load resources (programmatic, tests and generate)
await nuxt.callHook('build:resources')
}

async webpackDev(compiler) {
Expand Down

0 comments on commit caf5198

Please sign in to comment.