GoogleChromeLabs / webpack-libs-optimizations

Using a library in your webpack project? Here’s how to optimize it
Apache License 2.0
3.37k stars 111 forks source link

Added alias to react polyfills #17

Open porfirioribeiro opened 5 years ago

porfirioribeiro commented 5 years ago

create-react-context and react-lifecycles-compat are polyfill's not needed if you use latest React version and they increase your bundle by 5kb!

googlebot commented 5 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers
porfirioribeiro commented 5 years ago

I signed it!

googlebot commented 5 years ago

CLAs look good, thanks!

kurtextrem commented 5 years ago

That's a really clever trick.

Does UglifyJS remove the function call? If not, does /*#__PURE__*/ change it?

porfirioribeiro commented 5 years ago

Hmm i haven't investigated at that level, but will try to see if it makes any difference using the pure comment