feat(cli): catch build errors with cli:buildError
hook
#6475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refactor: errors during initiating/listening nuxt are non-recoverable thus should be fatal. Also some errors during the build are non-recoverable but not sure if thats some or all, so dont make those fatal for now
Types of changes
When you were developing your app and eg added a plugin but made a typo, then the re-build of Nuxt would fail but the loading screen would not reflect that. The build error was only visible on the console, which can be confusing if you are not used to looking at the console for errors.
This pr changes that (together with nuxt/loading-screen#45) to capture build errors in dev mode and print a stracktrace of them on the loading screen.
Description
Checklist: