A TypeScript compiler plugin for Rollup that uses the TypeScript Compiler API with incremental program for fast compilation. Version 1.0.18 is stable. The plugin supports compiler errors, incremental builds, declarations, source maps, and monorepo setups. It differs from alternatives like rollup-plugin-typescript2 and @rollup/plugin-typescript by using modern TypeScript APIs for performance, but at the cost of bypassing Rollup's preceding pipeline.
npm install rollup-plugin-ts-compilerVerified import paths — ran on the pinned version, not inferred.
Shows basic usage of rollup-plugin-ts-compiler with Rollup, including compiler options override.
Place this plugin before any other plugins that need to transform TypeScript code, or be aware that earlier plugins won't affect compiled output.
Use default import: import typescript from 'rollup-plugin-ts-compiler'
Only enable monorepo when you have local packages in a monorepo; otherwise leave it false.
Avoid relying on sharedState for long-term; monitor releases for alternatives.
Switch to ESM (e.g., add 'type': 'module' in package.json) or use dynamic import().
Use default import: import typescript from 'rollup-plugin-ts-compiler'
Ensure the overridden options are valid according to TypeScript's constraints.