Add feature flag to support typescript paths
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?
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
Any updates regarding this feature?