-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Provide unminified production distribution #5242
Comments
Running your project with |
I'm not talking about a node project. ;-) I use the |
I think @iamdustan doesn't mean Node, he means using envifying (with something like loose-envify or webpack's |
@gaearon yea, but that still means integrating node into your workflow. I think the ask is more about separating the minification part from the prod/dev split. And honesty I've thought about doing this for a while, making it clearer that
But apart from making it clearer for people who are inadvertently using the dev build in prod, I'm not sure what the real wins are. Minifiying an already minified lib isn't ideal but it should be harmless. @jochenberger could you explain why this would be helpful? |
@zpao Separating minification from the split is exactly my point. I use React in a Java web application framework. Users of the framework can enable or disable minification and toggle between development and production mode. Those settings are orthogonal (though the default settings are dev=>no minification, prod=> minification) |
See also #7242 |
We've actually gone into the opposite direction, and now minify even the CommonJS version ourselves in production mode. Doing this lets us apply optimizations that wouldn't otherwise be easy, consistently regardless of the bundler on the consuming side. We don't expect people to need to debug React code itself so we don't plan to provide an unminified production mode. But if you feel strongly about it, you can build React from source and disable minification. |
It would be nice if there was an unminified
react-production.js
in the release distributions. For example, this is useful for web application frameworks that do their own minification during runtime.The text was updated successfully, but these errors were encountered: