icons-pack / react-simple-icons

📦 This package provides the Simple Icons packaged as a set of React components.
MIT License
295 stars 18 forks source link

fix: rollup config prevented tree shaking #141

Closed TommasoAmici closed 2 years ago

TommasoAmici commented 2 years ago

As a followup to #140 I've opened this MR. It fixes the rollup config so that tree shaking works.

The main change is enabling preserveModules. This requires outputting to a directory instead of a file, so I have set the output to dist/cjs and dist/esm.

I have also taken the liberty of removing the createRollupConfig.js script as I think it's a level of indirection that's not needed at this scale.

I have tested locally with pnpm link

wootsbot commented 2 years ago

@TommasoAmici Thank you very much for your input, this should be merged to improve the package.