Skip to content

Strange behavior with Project References on #997

@kirill-konshin

Description

@kirill-konshin

I have a project where I'm using ts-loader@6.1.0 with projectReferences: true and following tsconfig:

{
  "extends": "xxx/typescript/tsconfig.json",
  "compilerOptions": {
    "composite": true,
    "incremental": true,
    "tsBuildInfoFile": "./.tscache/tsconfig.tsbuildinfo",
    "target": "es5",
    "module": "commonjs",
    "baseUrl": ".",
    "rootDir": "./src",
    "outDir": "./lib",
    "declaration": true,
    "declarationDir": "./lib",
    "typeRoots": [
      "./node_modules/@types"
    ],
    "paths": {
      "web-modules-core": [
        "../core"
      ],
    }
  },
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx"
  ],
  "references": [
    {
      "path": "../core"
    },
  ]
}

The project is a lerna monorepository.

On first build I get error that web-modules-core can't be resolved. Even though web-modules-core package (located in ../core) builds itself during the startup.

If I stop webpack and start it again it succeeds...

Metadata

Metadata

Assignees

No one assigned

    Labels

    pinneddon't let probot-stale close

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions