File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,9 @@ export function loadAliasFile(
29
29
targetFileName : string ,
30
30
) : AliasFile {
31
31
if ( ! aliasFileCache ) {
32
- const aliasProgram = ts . createProgram ( [ aliasFilePath ] , { } ) ;
32
+ const aliasProgram = ts . createProgram ( [ aliasFilePath ] , {
33
+ noLib : true ,
34
+ } ) ;
33
35
const aliasFile = aliasProgram . getSourceFile ( aliasFilePath ) ;
34
36
35
37
if ( ! aliasFile ) {
@@ -69,7 +71,9 @@ export function scanBetterFile(
69
71
targetFile : string ,
70
72
) : ReplacementMap {
71
73
const betterLibFile = path . join ( betterLibDir , targetFile ) ;
72
- const betterProgram = ts . createProgram ( [ betterLibFile ] , { } ) ;
74
+ const betterProgram = ts . createProgram ( [ betterLibFile ] , {
75
+ noLib : true ,
76
+ } ) ;
73
77
const betterFile = betterProgram . getSourceFile ( betterLibFile ) ;
74
78
if ( ! betterFile ) {
75
79
// This happens when the better file of that name does not exist.
You can’t perform that action at this time.
0 commit comments