Skip to content

Conversation

@hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented Apr 13, 2024

Since some "errors" only show on in console.error, so they won't be automatically processed by vitePluginErrorOverlay.

Either we need to do:

  • re-throw some errors inside react-server so it'll trigger unhandled error event.
  • extend vitePluginErrorOverlay to be able to receive custom error from react-server
  • extend vitePluginErrorOverlay to handle console.error log by patching
    • ✔️ this seems robust enough and nicely covers react use cases out-of-the-box without changing anything on react-server integration.

It doesn't look like hydrateRoot.onRecoverableError tells about the error either.

@hi-ogawa hi-ogawa changed the title feat(react-server): error overlay feat(error-overlay): collect errors from console.error Apr 13, 2024
@hi-ogawa hi-ogawa marked this pull request as ready for review April 13, 2024 06:40
@hi-ogawa hi-ogawa merged commit 58cef03 into main Apr 13, 2024
@hi-ogawa hi-ogawa deleted the feat-react-server-error-overlay branch April 13, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants