jiti icon indicating copy to clipboard operation
jiti copied to clipboard

Add feature flag to support typescript paths

Open alSergey opened this issue 9 months ago • 2 comments

Describe the feature

Currently, jiti does not support tsconfig.paths, which significantly impacts DX. This limitation exists to ensure that jiti remains portable and predictable by avoiding any reliance on external configuration files.

I’d like to propose adding a new option tsconfigPaths/tsconfigAliases which would be set to false by default. When enabled, jiti would resolve imports based on tsconfig.paths. This approach preserves the default behavior and predictability of jiti, while offering an opt-in improvement for those who want better DX in TypeScript projects.

The original comment where the proposal was discussed.

Additional information

  • [ ] Would you be willing to help implement this feature?

alSergey avatar Apr 08 '25 07:04 alSergey

This would be lovely to have 🙂 Jiti aliases work strangely for me because they don't seem to resolve at all. I want to import some files that use path aliases from a next.config.ts file, which runs before transpilation. I'm trying to use Jiti for that, but it fails to resolve packages, even when I configure alias

carloitaben avatar Apr 08 '25 12:04 carloitaben

Any updates regarding this feature?

domin-mnd avatar Jun 01 '25 12:06 domin-mnd