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.jsfrom 27,016 B to 25,851 B.