question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

tsconfig project references are not respected

See original GitHub issue

Only configurations in tsconfig.json can work, but tsconfig.*.json in "references" are not respected.

For example, this tsconfig.json works

{
  "compilerOptions": {
    //whatever
  },
  "include": ["src/**/*.vue"]
}

but this can not.

file: tsconfig.json

{
  "compilerOptions": {
    //whatever
  },
  "references": [
    {
      "path": "./tsconfig.app.json"
    }
  ]
}

file: tsconfig.app.json

{
 "extends": "./tsconfig.json",
 "compilerOptions": {
    //whatever
  },
  "include": ["src/**/*.vue"]
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
3Shaincommented, Oct 26, 2021

<del>New problem arises: I can’t import from any typescript file in .vue. TS6305: Output file '/**/*.d.ts' has not been built from source file '/**/*.ts'</del>

<del>I confirm this is related. If I move "include": ["**/*.ts"] from tsconfig.app.json to tsconfig.json then no error appears. (that is to say .ts and .vue must be “captured” by the same tsconfig, I think this is reasonable, while the method which you’ve provided can not be a simple work-around.) The feature of project references is still broken. </del>@johnsoncodehk

After several experiments I found the project references actually “works” (can confirm from the error message that tsconfig.app.json is effective). But ts6305 can still not be eliminated.

Made a minimal reproduce link

0reactions
johnsoncodehkcommented, May 20, 2022

@3Shain this is different problem, please track #649.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Project References - TypeScript
Project references are a new feature in TypeScript 3.0 that allow you to structure your TypeScript programs into smaller pieces.
Read more >
TypeScript auto-imports should respect project references
Auto-imports currently do not seem to respect project references. When several classes with the same name exist under different tsconfig.json files, ...
Read more >
How to use project references in TypeScript 3.0?
Renaming /tsconfig.json to /tsconfig-base.json is a pretty major thing by itself: the root folder is not a TypeScript project anymore, since ...
Read more >
Using TypeScript Project References to share common code
The answer is yes, since version 3 of TypeScript you can use Project References to share code between TypeScript projects.
Read more >
Typescript project references not compiling.
both project-a and project-b have the common project listed as a project reference in tsconfig.json. I would expect that first the dependencies listed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found