Improve error handling in dev mode when an error occurs during route building. Previously errors here would tend to crash the process. Now the error is used to generate a router which serves an error page for every request that contains the error stack. This allows the user to see the error and the Vite web socket to be connected which means the page will reload when the error is resolved without user intervention. In production mode, the error is still thrown right away which stops the build.
Motivation and Context
Screenshots (if appropriate):
Checklist:
[ ] I have updated/added documentation affected by my changes.
Description
Improve error handling in dev mode when an error occurs during route building. Previously errors here would tend to crash the process. Now the error is used to generate a router which serves an error page for every request that contains the error stack. This allows the user to see the error and the Vite web socket to be connected which means the page will reload when the error is resolved without user intervention. In production mode, the error is still thrown right away which stops the build.
Motivation and Context
Screenshots (if appropriate):
Checklist: