Registry / web-framework / wc-bundler

wc-bundler

JSON →
library0.10.8jsnpmunverified

A bundler for Web Components. Current stable version is 0.10.8, with ongoing active development and irregular release cadence. It provides TypeScript support out of the box and focuses on bundling single-file web components into a distributable format. Compared to larger bundlers like Webpack or Rollup, wc-bundler is lightweight and targeted specifically at Web Component authors.

npm install wc-bundler
INSTALL
IMPORT
SIG · WC-BUNDLER
W
wc-bundler
web-frameworkjavascriptv0.10.8
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

bundle
import { bundle } from 'wc-bundler'
const bundle = require('wc-bundler').bundle
ESM-only; require() will not work.
version
import { version } from 'wc-bundler'
Exports the package version string.

Shows how to bundle a TypeScript web component into an ESM module with type declarations.

import { bundle } from 'wc-bundler'; const result = await bundle({ input: 'src/my-component.ts', output: 'dist/my-component.js', format: 'esm', types: true, minify: true }, { key: process.env.KEY ?? '' }); console.log('Bundled:', result.outputFiles);
Debug
Known issues
breakingAs of version 0.8.0, the API changed from synchronous to asynchronous.
fix
Use await when calling bundle().
affects: >=0.8.0
deprecatedThe 'format' option 'umd' is deprecated and will be removed in 1.0.
fix
Use 'esm' or 'cjs' instead.
affects: >=0.9.0
gotchaTypeScript declarations are only generated when 'types: true' is explicitly set.
fix
Set { types: true } in options.
affects: all
Errors
Common errors & fixes
Error: bundle is not a function
Using require() instead of import.
fix
Use import { bundle } from 'wc-bundler' in an ESM context.
Cannot find module 'wc-bundler'
Package not installed.
fix
Run npm install wc-bundler.
Upgrade
Version history
0.10.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
1
Resources
wc-bundler — npm install wc-bundler · libregistry