polychrome icon indicating copy to clipboard operation
polychrome copied to clipboard

Add `sideEffects` to support Tree-Shaking?

Open IngwiePhoenix opened this issue 7 years ago • 2 comments

Just a little request to have the package.json option sideEffects added, which allows bundlers to perform tree-shaking on a library, effectively reducing the code size - if set to false, that is.

IngwiePhoenix avatar Sep 15 '18 18:09 IngwiePhoenix

Nice! Thanks for the request, @IngwiePhoenix . I'll ping you once I do some testing and have a PR ready.

cdonohue avatar Sep 17 '18 13:09 cdonohue

You're most welcome! I mainly need this for my WebPack build. I am a very critical guy when it comes to bundle sizes - germany doesn't have a very good mobile broadband coverage, therefore I can certainly expect users to be on slow connections sometimes. Therefore, my bundles need to be small :). I have this thread watched, so whenever you have something, let me know!

IngwiePhoenix avatar Sep 18 '18 06:09 IngwiePhoenix