DEV Community

Discussion on: How to write a tree-shakable component library

Collapse
 
michaelbayday profile image
Michael Dinh

This is not tree shaking, you will need to preserveModules and set output.dir within rollup to achieve true treeshaking

Collapse
 
uriklar profile image
Uri Klar

@michaelbayday can you expand on this please? I've followed this guide and indeed my library isn't being tree shaken.. Thanks!