-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preact/compat tree shakability #3295
Comments
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. |
Going to close this as a duplicate of #1529 |
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
The text was updated successfully, but these errors were encountered: