-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
add tree-shaking to exports (#946) #973
Conversation
@Saifadin Your changes doesn't make the code treeshakable. Default exports does not change anything. |
Okay good to know, what exactly does then? Any pointers would be helpful ^^ |
It's merged. Try to rebase to see results. |
@jaredpalmer Why you don't use default exports? |
@TrySound Akin FB Haste, we believe that everything should have a unique name in a codebase. Default exports allow people to name things differently across files which is bad. So we almost exclusively use named exports as they are more explicit and have better autocomplete in TS. |
@jaredpalmer Agree. I'm not TS user however still think default exports are quite useless and introduce even more problems like interop between cjs and esm. |
aside from being a huge breaking change, stylistically this can't be merged. Are there other ways to ensure tree-shaking? Or other bundle optimizations? Should we allow preshaking by altering the builds? |
I will give it another try today. |
Can i close? |
yes |
Adding tree-shaking to Formik according to (#946 ). This will allow better bundling for users out there, whenever they only import parts oft he application.
@jaredpalmer input is welcome