A Rollup plugin that resolves TypeScript path aliases (e.g., "~/*") defined in tsconfig.json, enabling cleaner imports in bundled output. Current stable version is 1.5.2, released periodically with minor fixes. It supports Rollup 2, 3, and 4, and ships TypeScript types. Unlike alternatives like @rollup/plugin-alias, this plugin directly reads tsconfig paths, reducing configuration duplication. It can auto-detect tsconfig via TS_NODE_PROJECT env var or cwd search, and offers log level control.
npm install rollup-plugin-tsconfig-pathsVerified import paths — ran on the pinned version, not inferred.
Shows minimal Rollup config using the plugin with tsconfig path resolution and common plugin chaining.
Order plugins: tsConfigPaths() first, then nodeResolve().
Set 'moduleResolution': 'node' in compilerOptions.
Use a single tsconfig or merge paths manually.
Unset TS_NODE_PROJECT or pass explicit tsConfigPath.
Install the plugin, add to rollup.config.js, ensure tsconfig has paths and baseUrl.
Use import tsConfigPaths from 'rollup-plugin-tsconfig-paths' (ESM) or const tsConfigPaths = require('rollup-plugin-tsconfig-paths').default (CJS).Pass a string path or array of strings.
No dependency data recorded yet.