Rollup TypeScript Path Aliases Plugin
JSON →rollup-plugin-typescript-paths is a Rollup plugin designed to automatically resolve TypeScript path aliases (defined in tsconfig.json's `paths` and `baseUrl` options) *after* your TypeScript code has already been transpiled. It is currently stable at version `1.5.0` and receives regular updates, with several minor releases in the past year addressing features and bug fixes. This plugin fills a specific niche for projects that use separate TypeScript transpilation steps (e.g., Babel, swc, tsc --emitDeclarationOnly) before bundling with Rollup, rather than relying on Rollup plugins that handle TypeScript compilation directly (like `rollup-plugin-typescript`). Its key differentiators include requiring no configuration for basic usage, robust wildcard support, and leveraging the official TypeScript API's `nodeModuleNameResolver` for accurate path resolution. It ensures that Rollup understands imports like `@utils/foo` when `tsconfig.json` maps `@utils/*` to `src/helpers/utils/*`.
Traffic · last 30 days ↓50% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · AR · 🇩🇪 Germany