0

On my Angular workspace setup, I got 3 libs and one app (more will come in future). The TypeScript paths setup is like so:

    "paths": {
      "@lib/a/*": [
        "projects/libs/a/*",
        "projects/libs/a"
      ],
      "@lib/a": [
        "dist/a/*",
        "dist/a"
      ],
      "@lib/b/*": [
        "projects/libs/b/*",
        "projects/libs/b"
      ],
      "@lib/b": [
        "dist/b/*",
        "dist/b"
      ],
      "@lib/c/*": [
        "projects/libs/c/*",
        "projects/libs/c"
      ],
      "@lib/c": [
        "dist/c/*",
        "dist/c"
      ],
    }

Everything builds fine but live reload from application when running ng serve is not working.

I tried a different path setup which was working but the error Unable to reference... appeared and then libs are not building anymore.

Do you have any ideas why ?

spcmnd
  • 1
  • 2

1 Answers1

0

I don't think you should ever reference dist/... from your tsconfig.json. Can you try the following:

"paths": {
  "@lib/a/*": [
    "projects/libs/a/*"
  ],
  "@lib/b/*": [
    "projects/libs/b/*"
  ],
  "@lib/c/*": [
    "projects/libs/c/*"
  ]
}
Poul Kruijt
  • 69,713
  • 12
  • 145
  • 149