Skip to content

Commit

Permalink
fix(mini-runner): 修复 builder 的 hooks 调用
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyadam committed Dec 31, 2019
1 parent d17a8c5 commit e9a25b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/taro-mini-runner/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ export default function build (appPath: string, config: IBuildConfig, mainBuilde
printBuildError(err)
return reject(err)
}
mainBuilder.hooks.afterBuild.call(stats)
resolve()
})
} else {
bindProdLogger(compiler, config.buildAdapter)
compiler.run((err) => {
compiler.run((err, stats) => {
if (err) {
printBuildError(err)
return reject(err)
}
mainBuilder.hooks.afterBuild.call(stats)
resolve()
})
}
Expand Down

0 comments on commit e9a25b8

Please sign in to comment.