-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
how remove debug info from react.min.js file when publish project #7990
Comments
This is because these lines are the last argument rather than the second "message" argument to If you'd like to fix it, please submit a PR that splits this into several |
my proposal use message map in apart js file
then use reactjs with message code. |
We already do exactly what you suggested. It's done automatically when you use |
We are talking about react-dom.min.js, not react.min.js. The gulp script (bfd1531) extracting the error-codes is not part of the build, so it had to be run separately. Doing what @gaearon said will actually make the minified version 19 bytes larger when I change the lines in ReactMount.js. There are currently more error-codes not part to codes.json, so we should gain in other places. Will continue on this tomorrow. |
Cleaning up the code table will bring down the size of react.min.js and react-dom.min.js. However, numbers in the code table should not contain gaps and renumbering causes tests (that depend on those numbers) to fail. I'll fix those too. |
@rickbeerendonk it's been fixed in #7999 but improvements are welcome. |
@keyanzhang I'll have a look. |
Conclusion:
@gaearon @keyanzhang |
Thanks for your contribution! However, However, it's interesting that you mentioned removing old messages from |
@keyanzhang The backwards compatibility is a bit hidden in the docs. It's due to having a central system for all error messages for old past versions? |
@rickbeerendonk Yeah, exactly. It should not affect the build size though. |
@keyanzhang Hmmm... it might be due to missing messages only, so that's fixed. |
I think this was fixed. |
how remove debug info from react.min.js file when publish project
The text was updated successfully, but these errors were encountered: