🛠️ Bug Fixes & Improvements
- Type Declaration Dir Isolation: Resolved path calculation issues when declarationDir is nested inside outDir (#251).
- ESM Dynamic Imports: Added support for dynamic imports with Import Attributes / Options (e.g. import('...', { with: { type: 'json' } })).
- Path Matching in Monorepos: Improved project directory resolution in outDir using ancestor suffix matching to prevent folder name collisions.
- fix(matcher): support
.tsx,.jsx,.mts,.mjs,.cts,.cjsfile extensions in import - Extended Module Extensions Support:
Import path resolution now properly strips and handles modern TypeScript and JavaScript extensions including.tsx,.jsx,.mts,.mjs,.cts, and.cjs(previously limited to.js,.ts, and.json). - Code Quality & Performance: Internal refactoring.
🌟 New Features
🎯 Path Mapping & Wildcard Enhancements
- Universal Wildcard & Suffix Pattern Matching (#233):
Added full support for TypeScript wildcard mappings with suffixes in both alias keys and target paths (e.g."@controllers/*": ["./src/controllers/*.controller"],"*-view": ["src/views/*"], or median wildcards"@api/*/v1").
🔗 TypeScript Project References
- Added
--follow-referencesflag to automatically resolve import aliases across your entire project references graph (tsc --build).
💖 Support the Project
If tsc-alias saves you time or helps your workflow, please consider:
- Giving the project a ⭐️ on GitHub
- Sponsoring on GitHub Sponsors
Every bit of support helps keep this project maintained and evolving. Thank you! 🙏
What's Changed
- fix: capture dynamic imports containing import attributes by @justkey007 in #268
- fix: prevent premature declarationDir scan and resolve type alias paths (#251) by @justkey007 in #269
- fix: accurately detect project dir in outDir using ancestor suffix matching (#205) by @justkey007 in #270
- feat: add support for TypeScript Project References via --follow-references by @justkey007 in #271
- fix: resolve alias paths when baseUrl points to a nested subdirectory by @justkey007 in #272
- fix: support wildcard suffixes in alias paths and improve extension matching by @justkey007 in #273
Full Changelog: v1.9.3...v1.9.4