Publishable libs with secondary entrypoints #5335
IThordGray
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there
I have a use case where I have to publish several of my more "core/shared" libs to NPM. These libs can become fairly when imported into other libs. As such I want to look at secondary entrypoints, or something similar to reduce the size a bit.
What I've managed to do is
What I can't come right with is doing both at the same time.
Example:
Libs:
shared-components
shared-layout
What I want to achieve is;
// In layoutModule
@import { ButtonModule } from '@someScope/components/button
And still be able to build and publish both these libraries.
Without the entry points, layout module will build will the list and tree module as well.
Tried and test. Went from a 2mb lib to +-200kb.
Is this at all possible?
Beta Was this translation helpful? Give feedback.
All reactions