drcmda / react-contextual

🚀 react-contextual is a small (less than 1KB) helper around React 16s new context api
MIT License
642 stars 23 forks source link

Tweaked build system - flat bundling, cjs build, better DCE support #4

Closed Andarist closed 6 years ago

drcmda commented 6 years ago

@Andarist great PR! Thank you!

Andarist commented 6 years ago

Not a problem, thanks for the great lib 😉

drcmda commented 6 years ago

@Andarist

screen shot 2018-02-06 at 12 35 20

Your changes truly brought it down to 1kb, it was more like an estimate at first 😀

If you have any other input or ideas, i would love to hear/and always up for sharing maintenance.

Andarist commented 6 years ago

Do you know what was the previous size of the lib? I knew it generally have to downsize it, just havent tested "how much". Also ain't sure which file do u test atm, cjs output? In consumers' production bundles it can be even less, because wrapped prop-types should get removed. 😃

drcmda commented 6 years ago

I tried package-size on the last version i made without react-broadcast, it's about 3kb, probably due to all the helpers.