Skip to content
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

Better solution to needing to quote property names in minified React #10

Closed
mihaip opened this issue May 11, 2015 · 3 comments
Closed

Comments

@mihaip
Copy link
Owner

mihaip commented May 11, 2015

The workaround done by 1ac9113 (where the minified version of React is edited by hand in order to put back some object literals) is rather gross.

Ideally there would be a way of generating an alternate minified version of React where the quotes are left in (and in general most minification steps can be skipped, since the Closure Compiler will do them too -- main thing to do is to do the __DEV__ replacement so that the build runs in production mode).

@sophiebits
Copy link

Maybe we (React) can publish a version that runs in prod mode but is unminified.

cc @sebmarkbage who's been thinking about using Closure Compiler for React.

@sebmarkbage
Copy link

My goal is that we always minify React with Closure Compiler but also generate a result that is compatible with another pass. This requires us to change patterns in a few places. For example, avoiding to use objects as Maps and instead use a proper Map abstraction.

I think we need the infrastructure to run tests to ensure that neither of these passes break. E.g. by running our Travis tests both before and after Closure Compiler minification.

@mihaip
Copy link
Owner Author

mihaip commented Jan 24, 2019

Obsolete given the dropping of Closure Compiler advanced optimizations support altogether in 15.4. Should be revisited if facebook/react#11092 is reopened.

@mihaip mihaip closed this as completed Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants