-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Reduce size (83kb min not gz is too big) #73
Comments
An option to exclude the I think I've seen other libraries do this by providing a |
@tracker1 @philwolstenholme fix |
@koddr would still add closure[1], to see how small you can get it, 38kb is still very large for what this library does. Another possibility would be conditional builds, so only the social networks desired are actually built. Like one with top (facebook, twitter, instagram, pinterest), and another with all. Alternatively a plugin structure, so that each social network is a separate add-in that can be joined into a single script after the fact, or loaded adjacently. [1] https://github.com/ampproject/rollup-plugin-closure-compiler |
@tracker1 hm.. |
If you can use the ADVANCED option for closure, it should gain you some size... |
And one more.. how do you want to cut |
So, I use it: ...
compiler({
compilation_level: "ADVANCED"
})
... Output size is |
class syntax would be hard without babel... you'd have to convert everything to prototype based inheritance modelling, which may not be worth it... though you may gain more by setting the minimum browser for your @babel/preset-env to IE9 or IE11 (depending on where you want to cut) as it is, it's generating transforms and using fills you don't actually need. |
|
You shouldn't need the separate |
The text was updated successfully, but these errors were encountered: