Skip to main content

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 :

  1. I have found no way of declaring child LWC as "public" in package B; I suppose all is public since the package is unlocked.
  2. I have found nothing about how to adapt jsconfig.json in package A to refer to child in package B
  3. Is it possible to share LWC components between (unlocked) packages ? If so, how ?
  4. Do the answers to these questions differ when the unlocked package has a namespace or when it does not have one ?

#LWC Component

 

cc @LWC @LWC Patterns @Lightning Web Components

7 Antworten
0/9000