Skip to content

Use dev-expression Babel plugin#124

Merged
ryanflorence merged 1 commit intoremix-run:masterfrom
taion:dev-expression
Nov 2, 2015
Merged

Use dev-expression Babel plugin#124
ryanflorence merged 1 commit intoremix-run:masterfrom
taion:dev-expression

Conversation

@taion
Copy link
Copy Markdown
Contributor

@taion taion commented Nov 2, 2015

This drops the size of History.min.js from 27,016 B to 25,851 B.

@mjackson
Copy link
Copy Markdown
Member

mjackson commented Nov 2, 2015

So we can already take advantage of this plugin without any code modifications? We're not currently using __DEV__ anywhere. What code is it removing?

@taion
Copy link
Copy Markdown
Contributor Author

taion commented Nov 2, 2015

@taion
Copy link
Copy Markdown
Contributor Author

taion commented Nov 2, 2015

And I have absolutely no idea why this isn't broadly used in the React ecosystem outside of Facebook's own modules. It's a free win for package size if you're using warning and invariant. You'd think the people who pulled out warning and invariant from fbjs would have noticed that there was this great Babel plugin that goes with them.

@agundermann
Copy link
Copy Markdown
Contributor

👍 Thanks for this @taion . Finally a real solution for remix-run/react-router#556

ryanflorence added a commit that referenced this pull request Nov 2, 2015
Use dev-expression Babel plugin
@ryanflorence ryanflorence merged commit b451277 into remix-run:master Nov 2, 2015
@taion taion deleted the dev-expression branch November 2, 2015 23:13
@mjackson
Copy link
Copy Markdown
Member

mjackson commented Nov 2, 2015

cc @BerkeleyTrue who maintains the warning package

@taion
Copy link
Copy Markdown
Contributor Author

taion commented Nov 2, 2015

I think this is the last missing piece of the warning/invariant trinity - the Babel plugin that Facebook use to strip everything out for production builds. Not a massive space savings by any means, but it's "free", more or less.

@BerkeleyTrue
Copy link
Copy Markdown

Yes?

@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants