{"id":22289,"library":"rollup-plugin-webbundle","title":"rollup-plugin-webbundle","description":"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.","status":"active","version":"0.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/GoogleChromeLabs/webbundle-plugins","tags":["javascript","rollup-plugin","web-bundle","isolated-web-app"],"install":[{"cmd":"npm install rollup-plugin-webbundle","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-webbundle","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-webbundle","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; plugin requires Rollup >=1.21.0 <4.0.0","package":"rollup","optional":false},{"reason":"needed for signing and WebBundleId generation in Isolated Web Apps mode","package":"wbn-sign","optional":true}],"imports":[{"note":"CJS require() works but ESM is preferred. The default export is the plugin factory.","wrong":"const webbundle = require('rollup-plugin-webbundle')","symbol":"default (webbundle)","correct":"import webbundle from 'rollup-plugin-webbundle'"},{"note":"The package exposes a default export only; named import will fail.","wrong":"import { webbundle } from 'rollup-plugin-webbundle'","symbol":"webbundle","correct":"import webbundle from 'rollup-plugin-webbundle'"},{"note":"TypeScript types are available for options. No explicit type export; infer from plugin.","wrong":"","symbol":"type imports if any","correct":"import type { RollupWebbundleOptions } from 'rollup-plugin-webbundle'"}],"quickstart":{"code":"import webbundle from 'rollup-plugin-webbundle';\n\nexport default {\n  input: 'src/index.js',\n  output: { dir: 'dist', format: 'esm' },\n  plugins: [\n    webbundle({\n      baseURL: 'https://example.com/',\n      static: { dir: 'static' },\n    }),\n  ],\n};","lang":"javascript","description":"Creates a Web Bundle from a Rollup build. The example sets baseURL and includes a static directory."},"warnings":[{"fix":"Set formatVersion: 'b1' if you need backward compatibility.","message":"v0.2.0 changed default formatVersion from 'b1' to 'b2'. Existing bundles may not parse in older parsers.","severity":"breaking","affected_versions":">=0.2.0"},{"fix":"None yet; follow GitHub releases.","message":"Option `output` used for signed bundles is inconsistently named; expect renaming in future releases.","severity":"deprecated","affected_versions":">=0.1.0 <1.0.0"},{"fix":"Downgrade Rollup to 3.x or wait for plugin update.","message":"Requires Rollup <4.0.0 as peer dependency. Rollup v4+ not supported.","severity":"gotcha","affected_versions":">=0.2.0"},{"fix":"Use Node >=16.0.0.","message":"Node <16 may cause cryptic errors due to missing Web Streams API support.","severity":"gotcha","affected_versions":">=0.2.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'npm install rollup-plugin-webbundle --save-dev'. If using CJS, ensure Node >=14 and rollup config uses .mjs or type:'module'.","cause":"Package not installed or ESM-only resolution fails (missing 'exports' field).","error":"Error: Cannot find module 'rollup-plugin-webbundle'"},{"fix":"Use 'import webbundle from 'rollup-plugin-webbundle'' instead of 'import { webbundle } from 'rollup-plugin-webbundle''.","cause":"Importing the plugin as a named import instead of default.","error":"TypeError: webbundle is not a function"},{"fix":"Install Rollup 3.x with 'npm install rollup@3' or wait for plugin update.","cause":"Incompatible Rollup version.","error":"Error: The plugin requires Rollup >=1.21.0 <4.0.0 but you have 4.0.0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}