react-router
react-router copied to clipboard
[Bug]: Dev message in prod build
What version of React Router are you using?
6.4
Steps to Reproduce
- Create a minimal app with react router
- Throw an error without an errorElement
- Run a production build
Expected Behavior
Do not show any dev related information
Actual Behavior
Currently, there is always some dev information. This is really confusing for customers if the dev is not aware that there is a default error component.

Maybe it's a good idea to mount a simplified DefaultErrorElement with only the message output if process.env.NODE_ENV !== 'production'?