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

Split static and dynamic www feature flags #11471

Merged
merged 2 commits into from Nov 6, 2017

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Nov 6, 2017

This makes it so that www feature flags only include things that are actually behind a GK.

In theory this would reduce the bundle size of FB bundles. In practice, it currently doesn't because even though we know more of them statically, we still end up with code like

var flag = false;

if (flag) {
  // ...
}

in production bundles. This is because we use Uglify for FB builds which is not as smart as GCC.

I have, however, verified that if we were to use GCC, it would strip them out (whereas it can’t possibly strip them out in the current version). So this seems incrementally better.

It might also be the case that the www minifer already handles conditions like this. In that case, even though it doesn’t show up as a win here, it might actually be in www after compilation.

@gaearon gaearon merged commit 96914c9 into facebook:master Nov 6, 2017
Ethan-Arrowood pushed a commit to Ethan-Arrowood/react that referenced this pull request Dec 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants