-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use React-provided stacktrace in crash overlay #1746
Comments
/cc @brandonmikeska who expressed interest in helping with the overlay |
Hey @Timer I am all for helping, but would need guidance on how to properly tackle this. |
FWIW, the way I imagined it is we have a middleware on the dev server running at |
Hmm ok! I have not implemented a middleware before, but I wouldn't mind learning if someone has time for a screen share or documentation links that I can read through to get something started. |
Since webpack-dev-server is an Express app, you can start by looking at Express's middleware document: https://expressjs.com/en/guide/using-middleware.html and webpack-dev-server's api document: https://webpack.github.io/docs/webpack-dev-server.html#api We create a webpack-dev-server (which is express app) inside start script: Then apply middleware from: hope this help :) |
@brandonmikeska we should probably start with #1322, would you like to tackle that issue? 😄 |
I've updated |
Yes, please! #1322 needs addressing -- I've explored how to implement the solution but not which path base is best for the solution itself. We'll need something for production, too. |
This has been completed across multiple PRs. 😄 |
The recently merged crash overlay should support whitelisted warnings thrown by React.
Currently, this can be accomplished by enabling the console proxy via:
However, this relies on a synthetically generated stack-trace and not the stack-trace provided by React in the warning. e.g.
This is problematic, however, because of how React works.
This results in an unreconstructed tree of components specifying where the problem is stemming from.
The stack-trace from React is actually already parsed, and used to replace the line references on the synthetically generated stack-trace.
The proper behavior, however, would be to not generate a synthetic stack-trace and rely solely on the stack-trace given by React.
We realize this may be a daunting issue, but if you are up to the challenge, we will answer your every question!
The text was updated successfully, but these errors were encountered: