Deprecated: this project is no longer maintained. Use tsdown instead. It handles ESM output,
.d.tsgeneration, path alias resolution, and package validation in a single build step, making post-compilation fixers like tsfix unnecessary. See Migrate to tsdown below.
A post-compilation tool that fixes TypeScript's critical ESM compatibility failures. Properly adds .js extensions, resolves path aliases, and handles index.js imports where tsc consistently falls short, even in the latest versions.
tsdown (powered by Rolldown + oxc) handles ESM output, .d.ts generation, path alias resolution, and package validation in a single build step, making post-compilation fixers like tsfix unnecessary. It replaces your entire build pipeline with one command.
See the tsdown documentation for setup instructions, or 2BAD/ts-lib-starter for a working example.
- #16577: Provide a way to add the '.js' file extension to the end of module specifiers (2017)
- #28288: Feature: disable extensionless imports (2018)
- #40878: Compiled JavaScript import is missing file extension (2020)
- #42151: TypeScript cannot emit valid ES modules due to file extension issue (2020)
- #50501: TypeScript is not an ECMAScript superset post-ES2015 (2022)
- #61037:
rewriteRelativeImportExtensionsdoesn't rewrite extensions in emitted declaration files (2025) - #61213: Allow allowImportingTsExtensions without either '--noEmit' or '--emitDeclarationOnly' (2025)
MIT