Closed antonioru closed 2 years ago
The package does not support tree shaking, that we should make such a drastic change? At the end of the day, bundled javascript by any and maintained bundler should three shake dead code.
The package does not support tree shaking, that we should make such a drastic change? At the end of the day, bundled javascript by any and maintained bundler should three shake dead code.
I understand your point and yes, I think you're correct assuming that 99% of the times one is using this library they're definitely using React which probably means they're using webpack or rollup or vite or anything of that sort...
on the other hand, three-sharking is not an automatic feature, it has to be configured and therefore can be mis-configured by the user.
I wonder if it's our duty to "force" the user to write "good code" by imposing default exports... I don't have an answer to be honest :))
So I think if it's a 99% of the user's bundlers coverage + to be honest it's a breaking change and I'm not sure if necessary and worth change.
So I think if it's a 99% of the user's bundlers coverage + to be honest it's a breaking change and I'm not sure if necessary and worth change.
fair enough... I'll do some research so I can possibly propose the right solution. I'm closing this issue for now then
Discussed in https://github.com/antonioru/beautiful-react-hooks/discussions/377