This article explains some pointers on how to achieve proper Tree Shake for a React Component Library bundled with Rollup. In fact, it is applicable to any other libraries in Node. The secret lies in sideEffects...
Please feel free to drop me a mail if you have any questions or interests to do some collaboration works @blusky_8893@hotmail.com