Rollup plugin that resolves module imports using the TypeScript resolution algorithm, providing accurate file extension resolution and support for TypeScript path mappings (paths, baseUrl). Version 1.0.1 is stable but rarely updated; the plugin relies on TypeScript's built-in resolution logic rather than custom patterns. Unlike alternatives like rollup-plugin-typescript2, this plugin focuses exclusively on resolution and does not include compilation. Useful for projects where TypeScript handles compilation separately (e.g., via tsc). Requires TypeScript >=3.4 as a peer dependency. Releases are infrequent; consider compatibility with latest TypeScript versions.
npm install rollup-plugin-typescript-resolveVerified import paths — ran on the pinned version, not inferred.
Basic Rollup config using TypeScript resolution before TypeScript compilation plugin.
Add a TypeScript compilation plugin after typescriptResolve in the Rollup plugins array.
Migrate to @rollup/plugin-typescript if you need compilation and resolution in one package.
Ensure TypeScript version is 3.4 or later.
Configure tsconfig.json with appropriate settings if needed.
Use import { typescriptResolve } from 'rollup-plugin-typescript-resolve' instead of import typescriptResolve from '...'Run npm install rollup-plugin-typescript-resolve --save-dev
Install TypeScript >=3.4 and ensure it is in the same resolution scope.