A TypeScript transpiler for LitElement components that inlines imported CSS/SCSS files and transpiles TypeScript decorators (@customElement, @property) to native JavaScript. Currently at version 0.1.0, it targets TypeScript ^3.7.0 to < ^3.8.2. It differentiates by automating style inlining and decorator removal, simplifying LitElement code for production. However, it is pre-release and no longer actively maintained, with a narrow TypeScript version range.
npm install lit-element-transpilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of the transform function: imports a LitElement component, inlines CSS, and transpiles decorators.
Use TypeScript 3.7.x or 3.8.0-3.8.1; avoid 3.8.2+ and 3.9+.
Consider alternatives like @open-wc/building-utils or custom-elements-manifest.
Ensure project TypeScript version is within 3.7.0 and 3.8.1.
Use mock-fs or write files to disk before calling transform.
Run 'npm install --save-dev typescript@^3.7.0' (within the required range).
Use 'import { transform } from 'lit-element-transpiler'' instead of default import.Ensure the CSS file exists at the expected location or use mock-fs in test environments.