-
Notifications
You must be signed in to change notification settings - Fork 49.1k
Closed
Labels
Description
Using Sentry for bug reporting in our production build we often encounter a componentStack
like:
in b
in li
in ul
in v
in div
in div
in i
in div
in Unknown
in t…
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:
- Set
mangle: false
in uglify (increases bundle size, but works) - Set
displayName
manually for all components (usually not feasible) - Use a babel plugin (somehow misses the majority of components for me)
- Write a tool, that resolves the names using sourcemaps
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.