Skip to content

Conversation

MacFJA
Copy link

@MacFJA MacFJA commented Mar 7, 2025

Add path mapping for TypeScript and Node

This PR add a path mapping/alias resolution for TypeScript (tsconfig.json: compilerOptions.paths) and node (package.json: imports)

  • Add custom pre-resolver to transform requested path [src/hooks/hooks.mts + src/service/resolve-mapping.ts]
  • Fix issue where configuration from the loaded tsconfig.json are not correctly override (rootDir not defaulted to the directory that contains the tsconfig.json file, same for ts config parser) [src/service/tsconfig.ts]
  • Fix tsconfig.json option paths being removed [src/service/transpile-only.ts]

Reuse PR #24 as base for unit tests


Closes #11 and #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subpath imports not working
2 participants