-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
gatsby's error catching development code found in production #23550
Comments
Hi, please follow our issue template as otherwise we don't understand what you're asking and thus we can't help you. <!--
Please fill out each section below, otherwise, your issue will be closed. This info allows Gatsby maintainers to diagnose (and fix!) your issue as quickly as possible.
Useful Links:
- Documentation: https://www.gatsbyjs.org/docs/
- How to File an Issue: https://www.gatsbyjs.org/contributing/how-to-file-an-issue/
Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
-->
## Description
Describe the issue that you're seeing.
### Steps to reproduce
Clear steps describing how to reproduce the issue. Please please please link to a demo project if possible, this makes your issue _much_ easier to diagnose (seriously).
How to Make a Minimal Reproduction: https://www.gatsbyjs.org/contributing/how-to-make-a-reproducible-test-case/
### Expected result
What should happen?
### Actual result
What happened.
### Environment
Run `gatsby info --clipboard` in your project directory and paste the output here. |
DescriptionThere is unnecessary code in production build generated by gatsby Steps to reproducerun gatsby build and gastby serve in gatsby starter default project root folder. Expected resultThere should'n be error throwing and checking for error throwing Actual resultthere is 50 + error messages, even for PropTypes which is used only in development. "" |
Ok few notes:
Cases that it can't handle is when you set In any case - in production But let's make a list of thing that are in default starter bundles and see which ones we actually can fix: Ones that actually originate from
We for sure can't really touch react-dom ones:
There few coming from Few coming from There are few cases of error we throw, but they are actually meant specifically for production code in lot of cases as well. |
Closing this as stale since in the meantime Gatsby v4 and updated related packages were released. Please try with the latest versions and if you still see this problem open a new bug report (it must include a minimal reproduction). |
I found bunch of error checks and messages in gatsby production build coming from app-[hash].js
Can we remove this like React did in their production code?
I tried to contribute but im still begginer.
If this is a feature, can it be disabled through env variables?
We dont debug production code but if we do could it will be possible to debug via source maps without error checks in app-[hash].js?
The text was updated successfully, but these errors were encountered: