Replies: 1 comment 3 replies
-
I have the same use case. @cseas did you find a solution? I tried with Rollup but to no avail. I have errors when consuming the result build in the consumer application and haven't found a way to fix them yet. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I couldn't find any reference in the docs regarding this. Use-case is to ship a TypeScript component library to npm that users can consume and tree-shake themselves (any unnecessary components should be removed from their bundle).
So far I've found Rollup is the only tool that's able to do this with
--preserveModules
. Webpack has an ongoing issue with limited experimental support for it.If I'm bundling my library with, say, 2 components, A & B. And my consumer is only using component A, how do I make sure they should be able to tree-shake B?
Beta Was this translation helpful? Give feedback.
All reactions