Do not do client-side checks in production #6292
Labels
domain: performance
Related to bundle size or perf optimization
proposal
This issue is a proposal, usually non-trivial change
Have you read the Contributing Guidelines on issues?
Motivation
We shouldn't do too many client-side checks in production. For example, we have a lot of fail-fast checks for Tabs to prevent bad configurations, which are still present in the production build and the error messages bloat up the bundle. In the spirit of bundle size optimization, we should only throw if
process.env.NODE_ENV === 'development'
, and let it display whatever can be displayed in production.Alternatively, we can have some minified error messages and have an error decoder? I'm actually not sure what solutions there are out there!
Just ran a search in our site's build output:
All occurrences of "Docusaurus error" (standardized prefix of our browser error message)
Self-service
The text was updated successfully, but these errors were encountered: