Iconscout / react-unicons

1000+ vector icons as easy to use React Components
https://iconscout.com/unicons
Other
334 stars 39 forks source link

Let webpack treeshake unused icons #8

Closed eddiecooro closed 4 years ago

eddiecooro commented 4 years ago

I've added the "sideEffects": false entry to the package.json file to let webpack know that none of the files of this package contain side effects. Check these links about this option: https://stackoverflow.com/questions/49160752/what-does-webpack-4-expect-from-a-package-with-sideeffects-false and this: https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free

tarunmangukiya commented 4 years ago

Thank you @Eddie-CooRo for the PR.

eddiecooro commented 4 years ago

Hey @tarunmangukiya. Thank you for the your prompt response. With the help of this release, we were able to reduce our bundle size about 2.5 MBs. while keeping our preferred code style (importing from index file) 🙏🙏🙏

tarunmangukiya commented 4 years ago

I am glad to hear that! Excited to see Unicons in action 🙏