I have a set of small packages using some shared LWC headless components (Javascript-only). I cannot find the right syntax to get my parent LWC component in package A to refer to child component in package B : it will not compile and not deploy to my scratch org, although package B is installed.
Questions :
- I have found no way of declaring child LWC as "public" in package B; I suppose all is public since the package is unlocked.
- I have found nothing about how to adapt jsconfig.json in package A to refer to child in package B
- Is it possible to share LWC components between (unlocked) packages ? If so, how ?
- Do the answers to these questions differ when the unlocked package has a namespace or when it does not have one ?
7 Antworten
I never got this to work with namespaced unlocked packages.
So I'm using unlocked packages without namespaces.