Rollup plugin that processes TypeScript code inside HTML `<script lang="ts">` tags, transpiling it to JavaScript using one of four engines: oxc (default), swc, esbuild, or the TypeScript compiler. Version 1.0.6 requires Node.js >=18 and supports Rollup 1–4. Unlike full-featured build plugins (e.g., @rollup/plugin-typescript), this performs no type checking, focusing solely on transpilation. Ships TypeScript declarations. Release cadence is irregular; last update June 2025.
npm install rollup-plugin-inline-tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic Rollup config using the plugin with the default oxc engine and custom extensions.
Upgrade Node.js to >=18 or use an older version of the plugin (e.g., 0.x) if needed.
Explicitly set engine: 'swc' and install @swc/core, or install oxc-transform.
Pass compiler options via the 'options' field: inlineTs({ engine: 'typescript', options: { target: 'ESNext' } })Run tsc separately or use a type-checking plugin like @rollup/plugin-typescript alongside.
Run 'npm install oxc-transform --save-dev' or set a different engine (e.g., engine: 'swc').
Use 'import inlineTs from 'rollup-plugin-inline-ts'' (default import).
Ensure rollup.config.js uses ESM (e.g., type: 'module' in package.json) or use .mjs extension.