Skip to content

Commit

Permalink
fix(helper): remove moduleResolution and add debug
Browse files Browse the repository at this point in the history
  • Loading branch information
TomokiMiyauci committed Jan 2, 2022
1 parent 7b8835b commit 33ed285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helper/_option.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ function makeHostOption(
libMap: Map<string, string>,
compilerOptions: CompilerOptions,
): CompilerHost {
console.log(libMap);
return {
readFile,
useCaseSensitiveFileNames,
getDefaultLibFileName: () => "/lib.d.ts",
getCurrentDirectory,
getCanonicalFileName,
getSourceFile: (fileName, lang) => {
console.log(fileName, lang);
if (libMap.has(fileName)) {
return ts.createSourceFile(fileName, libMap.get(fileName)!, lang);
}
const sourceText = Deno.readTextFileSync(fileName);
return ts.createSourceFile(fileName, sourceText, lang);
},
directoryExists,
fileExists,
writeFile,
getNewLine,
resolveModuleNames: makeResolveModuleNames(compilerOptions),
};
}

Expand Down

0 comments on commit 33ed285

Please sign in to comment.