webpack-libs-optimizations icon indicating copy to clipboard operation
webpack-libs-optimizations copied to clipboard

Added alias to react polyfills

Open porfirioribeiro opened this issue 7 years ago • 5 comments

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!

porfirioribeiro avatar Sep 19 '18 20:09 porfirioribeiro

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

googlebot avatar Sep 19 '18 20:09 googlebot

I signed it!

porfirioribeiro avatar Sep 19 '18 20:09 porfirioribeiro

CLAs look good, thanks!

googlebot avatar Sep 19 '18 20:09 googlebot

That's a really clever trick.

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

kurtextrem avatar Sep 20 '18 07:09 kurtextrem

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

porfirioribeiro avatar Sep 20 '18 07:09 porfirioribeiro