react-router icon indicating copy to clipboard operation
react-router copied to clipboard

[Bug]: Dev message in prod build

Open Speedy1991 opened this issue 3 years ago • 0 comments

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. image

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

Speedy1991 avatar Nov 02 '22 09:11 Speedy1991