fix(builder): graceful unwatch when devMiddleware is not initialized

This commit is contained in:
Pooya Parsa 2018-03-24 12:22:49 +04:30
parent 1f9eed592f
commit a91e6fa0db

View File

@ -648,7 +648,9 @@ export default class Builder {
this.compilersWatching.forEach(watching => watching.close())
// Stop webpack middleware
await this.webpackDevMiddleware.close()
if (this.webpackDevMiddleware) {
await this.webpackDevMiddleware.close()
}
}
// TODO: remove ignore when generateConfig enabled again