Registry / web-framework / rollup-plugin-lwc-typescript

rollup-plugin-lwc-typescript

JSON →
library1.0.1jsnpmunverified

Rollup plugin to transform TypeScript files to JavaScript for Lightning Web Components (LWC). Current stable version is 1.0.1 (deprecated view; the broader ecosystem moved to lwc-services 3.x and LWC 2.x). Release cadence is low; no updates since 2020. Differentiator: specifically tailored for LWC TypeScript compilation, using the TypeScript compiler directly. Alternatives: use LWC's official webpack-based compilation or the lwc-services CLI.

npm install rollup-plugin-lwc-typescript
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-LWC-
R
rollup-plugin-lwc-typescript
web-frameworkjavascriptv1.0.1
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–223 runs
build_error
glibc
node 18–223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ import lwcTypescript from 'rollup-plugin-lwc-typescript'
✗ import { lwcTypescript } from 'rollup-plugin-lwc-typescript'
The plugin is exported as default, not a named export.
rollupPluginLwcTypescript (CommonJS)
✓ const lwcTypescript = require('rollup-plugin-lwc-typescript')
✗ const { lwcTypescript } = require('rollup-plugin-lwc-typescript')
CommonJS require returns the default export.
TypeScriptConfig
✓ import type { TypeScriptConfig } from 'rollup-plugin-lwc-typescript'
TypeScript types are available from the package.

Shows basic Rollup configuration using LWC TypeScript plugin to compile a component.

// rollup.config.js import lwcTypescript from 'rollup-plugin-lwc-typescript'; import resolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; export default { input: 'src/component.ts', output: { file: 'dist/component.js', format: 'esm' }, plugins: [ resolve(), commonjs(), lwcTypescript() ] };
Debug
Known issues
deprecatedPackage is deprecated and no longer maintained.
fix
Migrate to LWC's official webpack-based build system or use lwc-services CLI.
affects: >=1.0.0
breakingLWC 2.x upgraded to @lwc/engine-dom from @lwc/engine; this plugin was not updated and may produce incompatible code.
fix
Use lwc-services 3.x or higher which supports LWC 2.x.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'rollup-plugin-lwc-typescript'
Package not installed or outdated npm cache.
fix
npm install rollup-plugin-lwc-typescript --save-dev
TypeError: lwcTypescript is not a function
Incorrect import style; used named import instead of default.
fix
Use: import lwcTypescript from 'rollup-plugin-lwc-typescript';
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
rolluprequiredRequired as peer dependency for Rollup plugin functionality
typescriptrequiredUsed to compile TypeScript files
lwc-servicesoptionalLWC build system that replaced this plugin
Agent activity
2 hits · last 30 days
node
2
Resources
rollup-plugin-lwc-typescript — npm install rollup-plugin-lwc-typescript · libregistry