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
Ship ES6 version of the library #33
Comments
Hi @stalniy If you do have time to send a PR, it would be awesome. Otherwise, I will work on this as soon as I have the chance. |
This reduces final minified size on 2KB :) Fixes lucaong#33
Hi @lucaong Please check the PR and release a new version. With rollup mingzipped size is ~ 2 KB smaller :) and ~7KB smaller without gzip Update: let me know if you have any questions |
This reduces final minified size on 2KB :) Fixes lucaong#33
Amazing! Thanks a lot, I'll check it now. |
This reduces final minified size on 2KB :) Fixes #33
I released a new version Thanks again! |
If you publish minified version, you will be able to save additional 1KB. I used terser to minify the bundle. Terser allows to mangle properties. That means that all private properties that start from |
Please also add |
@lucaong I don't agree with the comment of the issue #4 . Because
Anyway, nobody fights for extra 1KB, so it's up to you. |
I see your point. I will take some time to think about it, and check what other libraries are doing before deciding on this. |
Today there are major browsers support ES6 and ESM, so it make sense to ship ES6 version of your library together with UMD version.
Usually there are 3 types of versions which are good to have in your package:
To make this job easier I'd recommend you to use rollup instead of webpack. The resulting bundle will be smaller and without internal module system (which webpack adds in the bundle).
You can check https://github.com/stalniy/rollup-plugin-content/blob/master/rollup.config.js to see how I did this in one of my libraries.
Let me know if you need help with this, I can submit a PR.
The text was updated successfully, but these errors were encountered: