dankogai / js-base64

Base64 implementation for JavaScript
BSD 3-Clause "New" or "Revised" License
4.27k stars 1.33k forks source link

ADD sideEffects:false #163

Closed pubkey closed 1 year ago

pubkey commented 1 year ago

This PR sets sideEffects: false in the package.json. That will give webpack a hint to better bundle this library and to run tree shaking. It anyway exports a pure function that has no side effect on importing.

From https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free :

The new webpack 4 release expands on this capability with a way to provide hints to the compiler via the "sideEffects" package.json property to denote which files in your project are "pure" and therefore safe to prune if unused.

dankogai commented 1 year ago

Thank you!