v2.2.2
Fixed
resolveImport
previously wouldn't accept a result of parsingtsconfig.json
because some values first need to be converted through their specific enum. Meaning that you can now do this:
const tsCompilerOptions = {
moduleResolution: "Bundler" as const, // previously this had to be ts.ModuleResolutionKind.Bundler
baseUrl: ".",
paths: {
"~/*": ["./src/*"],
},
};
resolveImport(
"~/shared/ui",
"src/pages/home/ui/HomePage.tsx",
tsCompilerOptions,
fs.fileExists,
);
Which is a lot easier! Shame on the API of TypeScript for requiring such hacks, but what can you do /shrug.