Skip to content

Commit

Permalink
Fix solution style tsconfigs
Browse files Browse the repository at this point in the history
Resolves #2406
  • Loading branch information
Gerrit0 committed Oct 6, 2023
1 parent 878e06a commit 608cf48
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Bug Fixes

- Fixed tsconfig handling for projects using a solution-style tsconfig, #2406.
- Fixed broken settings icons caused by icon caching introduced in 0.25.1, #2408.

### Thanks!
Expand Down
21 changes: 14 additions & 7 deletions src/lib/utils/entry-point.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,20 @@ function getEntryPrograms(
logger: Logger,
options: Options,
) {
const rootProgram = ts.createProgram({
rootNames: options.getFileNames().length
? options.getFileNames()
: inputFiles,
options: options.getCompilerOptions(),
projectReferences: options.getProjectReferences(),
});
const noTsConfigFound =
options.getFileNames().length === 0 &&
options.getProjectReferences().length === 0;

const rootProgram = noTsConfigFound
? ts.createProgram({
rootNames: inputFiles,
options: options.getCompilerOptions(),
})
: ts.createProgram({
rootNames: options.getFileNames(),
options: options.getCompilerOptions(),
projectReferences: options.getProjectReferences(),
});

const programs = [rootProgram];
// This might be a solution style tsconfig, in which case we need to add a program for each
Expand Down

0 comments on commit 608cf48

Please sign in to comment.