GoogleChromeLabs / webpack-libs-optimizations

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

Mention `babel-react-optimize` #14

Open kurtextrem opened 6 years ago

kurtextrem commented 6 years ago

closes #9

iamakulov commented 6 years ago

Thanks, great addition!

1. One thought about babel-react-optimize: should we avoid mentioning it? The primary use-case of this repo (as I see it) is:

babel-react-optimize doesn’t fit this use-case (the tip doesn’t help to make the app smaller); moreover, in fact, it advertises this solution (some readers might neglect the warning or skip it and install this preset)

2. Also: should we give an example of the transformation that the transform-react-pure-class-to-function plugin does? E.g., like we do for date-fns.

kurtextrem commented 6 years ago
  1. Hm, I see your point. However, I think people come here to learn about "how can I make my app faster/reduce bundle size?". So to say they are here to learn. This is why I would teach them "not everything is good".

But I guess this one would be even better: Get a PR merged to babel-react-optimize to warn there, instead of on a 3rd party repo :)

  1. Good idea
iamakulov commented 6 years ago

Thinking about it again, and I think youʼre right, it makes sense for this repo!

Looking forward to merging this when we add transform-react-... examples :)