I'm curious about this section: <https://www.pants...
# general
e
I'm curious about this section: https://www.pantsbuild.org/stable/docs/javascript/overview/enabling-typescript-support#configuring-project-references I have my tsconfig set up with
Copy code
{
  "references": [
    {
      "path": "./shared/header"
    },
    {
      "path": "./apps/app1"
    }
  ]
}
This seems to work for typescript itself (ie.
pants check ::
) passes successfully), but my dependency inference is not working correctly. When I run
pants test ::
my tests of
app1
fail because they cannot import from the shared package. Sure enough,
pants dependencies
and/or inspecting sandboxes reveals that there are no transitive dependencies from any of the
app1
sources on the shared package. I assume I am missing a config somewhere, but I'm not sure what. Any thoughts?
My root tsconfig.json does have:
Copy code
{
  "compilerOptions": {
    "paths": {
      "header": [
        "./shared/header/src/public-api.ts"
      ]
    },
}
which makes angular happy with the shared package import if I run
ng serve
directly (not via pants)
n
e
@nutritious-hair-72580 I am using
npm
n
Ok - that rules that out. I'm not sure sorry - it's not a scenario I've worked on or used.
e
oh well, thanks for the look 🙂 I'll still probably get some benefits with 1 super-package, since we aren't publishing individual bits anyways
👍 1