Open samouri opened 2 years ago
Originally posted in 2021, still open and apparently still a problem?
Is someone working on this?
As the "after X" tag indicates, it's something we probably can't safely change in Preact X.
It's something we'd like to address in the future, at least in part (some of compat will always be unshakable in all likelihood), but there's nothing anyone can change about this now.
summary
I noticed that when importing from
preact/compat
, much more is pulled in than expected. For example, when bundling code like this:It creates ~2x greater binary size than directly copy/pasting the necessary function.
I've created a minimal reproduction here: https://github.com/samouri/preact-shakability