Skip to content

v2.2.2

Compare
Choose a tag to compare
@illright illright released this 04 Jun 17:30
· 16 commits to main since this release
44a11fb

Fixed

  • resolveImport previously wouldn't accept a result of parsing tsconfig.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.