tsconfig project references are not respected
See original GitHub issueOnly 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:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
<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"]
fromtsconfig.app.json
totsconfig.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>@johnsoncodehkAfter 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
@3Shain this is different problem, please track #649.