-
Notifications
You must be signed in to change notification settings - Fork 47.1k
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
Best practice for a meaningful componentStack in production? #12757
Comments
Even a Babel plugin that automatically adds At FB we currently include filenames in |
Cool, thanks for your feedback @gaearon! |
I guess it depends on how good the compression ends up being in your case. Have you measured the difference? In my experience mangling still ends up being significant. Moreover, compression only helps with network. It doesn’t affect the parsing time. |
I haven‘t measured the size, but I think it went up from 600 to 700kb, which I guess is all right for any non-FB scale app. |
Using Sentry for bug reporting in our production build we often encounter a
componentStack
like:Of course, this doesn’t help to locate the problem at all. So I’m wondering, what’s the best practice to get usable information from ErrorBoundaries and the componentStack.
The following options seem to be available:
mangle: false
in uglify (increases bundle size, but works)displayName
manually for all components (usually not feasible)I’m curious to hear, what most people are using. For me, only the first option works well, but it doesn’t feel like a very elegant solution.
The text was updated successfully, but these errors were encountered: