mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 09:33:54 +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))
|
.then(() => nuxt.listen(port, host))
|
||||||
// Pass new nuxt to watch chain
|
// Pass new nuxt to watch chain
|
||||||
.then(() => instance)
|
.then(() => instance)
|
||||||
// Call showReady
|
|
||||||
.then(() => nuxt.showReady())
|
|
||||||
// Handle errors
|
// Handle errors
|
||||||
.catch(err => onError(err, instance))
|
.catch(err => onError(err, instance))
|
||||||
)
|
)
|
||||||
|
@ -207,9 +207,13 @@ export default class WebpackBaseConfig {
|
|||||||
name: this.isServer ? 'server' : 'client',
|
name: this.isServer ? 'server' : 'client',
|
||||||
color: this.isServer ? 'orange' : 'green',
|
color: this.isServer ? 'orange' : 'green',
|
||||||
compiledIn: false,
|
compiledIn: false,
|
||||||
done: () => {
|
done: (states) => {
|
||||||
if (this.options.dev) {
|
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