Debugging multiple Stencil packages in a monorepo

Hello,
We are using a monorepo (turborepo) to manage multiple Stencil-based packages. We have not yet found a good way to debug multiple packages that depend on each other.

For example, we have package-A which depends on package-B. We want to make a change in package-B but test it in the www for package-A. So we run stencil build --dev --watch --serve in both packages simultaneously. This will rebuild package-B if a change is saved, but it does NOT seem to run the copy routines specified in stencil.config.ts for package-B. Therefore, the new code for package-B gets build, but it does not get copied over into the www folder for package-A. This forces us to fully rebuild package-A in order to pick up the changes, or roll some sort of custom copy script.

Is there a better solution for this?

Did you ever get this figured out? I’d love to see how you got it figured out.

Without any resolution or recommendation from Ionic, the best we have managed is to create a custom copy script that we run manually whenever code change happen in package-B.

So we have 3 active terminals:

  1. Running yarn start for package-A
  2. Running yarn start for package-B
  3. To manually run node copy-code-from-B-to-A.js whenever we change code in package-B

We still have some cases where this doesn’t work, but it’s better than nothing.