Registry / web-framework / rollup-config-webcomponent

rollup-config-webcomponent

JSON →
library0.3.4jsnpmunverified

Rollup configuration preset for building web components with lit-element. Version 0.3.4 provides an environment-driven config that supports TypeScript, SCSS/Sass, PostCSS, Terser minification, and Babel transpilation. It uses peer dependencies rollup 2.x and tslib 2.0.x. Key differentiators: single import for all plugins and configs, environment flags for bundle/compress/ECMAScript target, and built-in lit-element integration. Suitable for monorepos with multiple packages. Note: not extensively tested in IE11, and uses deprecated 'isAsset' check (no impact).

npm install rollup-config-webcomponent
INSTALL
IMPORT
SIG · ROLLUP-CONFIG-WEBC
R
rollup-config-webcomponent
web-frameworkjavascriptv0.3.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

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

default
import createConfig from 'rollup-config-webcomponent'
const createConfig = require('rollup-config-webcomponent')
Package is ESM-only; CommonJS require will fail.
createConfig
import { createConfig } from 'rollup-config-webcomponent'
import createConfig from 'rollup-config-webcomponent'
Both named and default exports are the same function. Using default import is preferred.
config
import { config } from 'rollup-config-webcomponent'
Named export 'config' is a sample config object, not the factory function.

Shows minimal usage: import the factory function and pass options (name, input) to generate a Rollup config.

// rollup.config.js import createConfig from 'rollup-config-webcomponent'; export default createConfig({ name: 'my-element', input: './src/index.ts', });
Debug
Known issues
deprecatedAccessing 'isAsset' on files in the bundle is deprecated, please use 'type === "asset"' instead. This warning originates from rollup-plugin-filesize and has no functional impact.
fix
No action needed; warning is cosmetic. Wait for upstream fix.
affects: >=0.0.1
gotchaWhen 'bundle' environment is set, TypeScript declaration generation may be disabled if you don't configure it manually.
fix
Ensure your tsconfig.json includes 'declaration: true' and set '--environment bundle' config accordingly.
affects: >=0.0.1
gotchaPackage requires peer dependencies rollup@2.x and tslib@2.0.x. Using incompatible versions may cause build failures.
fix
Install correct peer versions: 'npm install rollup@2 tslib@2.0'
affects: >=0.0.1
gotchaThe config sets Babel as the transpiler; TypeScript is only used for type-checking and declaration generation. Target default is 'esnext', but Babel may not support all JS features.
fix
If you need ES5 output, ensure ecma:5 is passed via environment or options.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'rollup-config-webcomponent'
Module not installed or not in node_modules path.
fix
Run 'npm install rollup-config-webcomponent --save-dev'
Cannot read property 'createConfig' of undefined
Attempting to use CommonJS require on an ESM-only package.
fix
Use ES module import syntax: 'import createConfig from 'rollup-config-webcomponent''
Error: Could not resolve 'tslib'
Missing peer dependency tslib.
fix
Install tslib: 'npm install tslib@2.0'
Upgrade
Version history
0.3.4latest on npm
Audit
Dependencies
rolluprequiredpeer dependency: rollup 2.x required
tslibrequiredpeer dependency: required for TypeScript compilation
Agent activity
7 hits · last 30 days
node
6
Resources
rollup-config-webcomponent — npm install rollup-config-webcomponent · libregistry