Registry / devops / rollup-plugin-webbundle

rollup-plugin-webbundle

JSON →
library0.2.0jsnpmunverified

Rollup plugin to generate Web Bundles and signed Web Bundles (Isolated Web Apps). Version 0.2.0 is alpha; requires Node >=16, Rollup >=1.21.0 <4.0.0. Supports both unsigned (WBN) and signed (SWBN) bundles via integration with wbn-sign. Plugins for general web packaging and Chrome's Isolated Web Apps. No other Rollup WebBundle plugins exist, making this the primary option but highly experimental. Release cadence is low.

npm install rollup-plugin-webbundle
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-WEBB
R
rollup-plugin-webbundle
devopsjavascriptv0.2.0
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 (webbundle)
import webbundle from 'rollup-plugin-webbundle'
const webbundle = require('rollup-plugin-webbundle')
CJS require() works but ESM is preferred. The default export is the plugin factory.
webbundle
import webbundle from 'rollup-plugin-webbundle'
import { webbundle } from 'rollup-plugin-webbundle'
The package exposes a default export only; named import will fail.
type imports if any
import type { RollupWebbundleOptions } from 'rollup-plugin-webbundle'
TypeScript types are available for options. No explicit type export; infer from plugin.

Creates a Web Bundle from a Rollup build. The example sets baseURL and includes a static directory.

import webbundle from 'rollup-plugin-webbundle'; export default { input: 'src/index.js', output: { dir: 'dist', format: 'esm' }, plugins: [ webbundle({ baseURL: 'https://example.com/', static: { dir: 'static' }, }), ], };
Debug
Known issues
breakingv0.2.0 changed default formatVersion from 'b1' to 'b2'. Existing bundles may not parse in older parsers.
fix
Set formatVersion: 'b1' if you need backward compatibility.
affects: >=0.2.0
deprecatedOption `output` used for signed bundles is inconsistently named; expect renaming in future releases.
fix
None yet; follow GitHub releases.
affects: >=0.1.0 <1.0.0
gotchaRequires Rollup <4.0.0 as peer dependency. Rollup v4+ not supported.
fix
Downgrade Rollup to 3.x or wait for plugin update.
affects: >=0.2.0
gotchaNode <16 may cause cryptic errors due to missing Web Streams API support.
fix
Use Node >=16.0.0.
affects: >=0.2.0
Errors
Common errors & fixes
Error: Cannot find module 'rollup-plugin-webbundle'
Package not installed or ESM-only resolution fails (missing 'exports' field).
fix
Run 'npm install rollup-plugin-webbundle --save-dev'. If using CJS, ensure Node >=14 and rollup config uses .mjs or type:'module'.
TypeError: webbundle is not a function
Importing the plugin as a named import instead of default.
fix
Use 'import webbundle from 'rollup-plugin-webbundle'' instead of 'import { webbundle } from 'rollup-plugin-webbundle''.
Error: The plugin requires Rollup >=1.21.0 <4.0.0 but you have 4.0.0
Incompatible Rollup version.
fix
Install Rollup 3.x with 'npm install rollup@3' or wait for plugin update.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
rolluprequiredpeer dependency; plugin requires Rollup >=1.21.0 <4.0.0
wbn-signoptionalneeded for signing and WebBundleId generation in Isolated Web Apps mode
Agent activity
4 hits · last 30 days
node
4
Resources
rollup-plugin-webbundle — npm install rollup-plugin-webbundle · libregistry