Skip to content

Commit

Permalink
fix: create program for imports input file #318 (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
NWYLZW authored Oct 23, 2024
1 parent 989ec06 commit e74fb86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ function getModule(
if (isEntry) {
return p.getRootFileNames().includes(fileName);
} else {
return !!p.getSourceFile(fileName);
const sourceFile = p.getSourceFile(fileName);
if (sourceFile && p.isSourceFileFromExternalLibrary(sourceFile)) {
return false;
}
return !!sourceFile;
}
});
if (existingProgram) {
Expand Down

0 comments on commit e74fb86

Please sign in to comment.