mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix: prevent showReady when has compile errors
This commit is contained in:
parent
d6d5ae26af
commit
46fcf47db1
@ -128,8 +128,6 @@ function startDev(oldInstance) {
|
||||
.then(() => nuxt.listen(port, host))
|
||||
// Pass new nuxt to watch chain
|
||||
.then(() => instance)
|
||||
// Call showReady
|
||||
.then(() => nuxt.showReady())
|
||||
// Handle errors
|
||||
.catch(err => onError(err, instance))
|
||||
)
|
||||
|
@ -207,9 +207,13 @@ export default class WebpackBaseConfig {
|
||||
name: this.isServer ? 'server' : 'client',
|
||||
color: this.isServer ? 'orange' : 'green',
|
||||
compiledIn: false,
|
||||
done: () => {
|
||||
done: (states) => {
|
||||
if (this.options.dev) {
|
||||
this.nuxt.showReady()
|
||||
const hasErrors = Object.values(states).some(state => state.stats.hasErrors())
|
||||
|
||||
if (!hasErrors) {
|
||||
this.nuxt.showReady()
|
||||
}
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
Loading…
Reference in New Issue
Block a user