-
Notifications
You must be signed in to change notification settings - Fork 960
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
Use dev-expression Babel plugin #124
Conversation
So we can already take advantage of this plugin without any code modifications? We're not currently using |
It's these two: https://github.com/4Catalyzer/babel-plugin-dev-expression#invariant, https://github.com/4Catalyzer/babel-plugin-dev-expression#warning For a production build, this strips out calls to Though https://github.com/rackt/history/blob/v1.13.0/package.json#L13 means that these will also happen for our un-minified UMD bundle, which I'm not sure if you want. |
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 |
👍 Thanks for this @taion . Finally a real solution for remix-run/react-router#556 |
Use dev-expression Babel plugin
cc @BerkeleyTrue who maintains the |
I think this is the last missing piece of the |
Yes? |
This drops the size of
History.min.js
from 27,016 B to 25,851 B.