{"library":"rollup-plugin-workbox","title":"rollup-plugin-workbox","description":"Rollup plugin that builds a service worker with Workbox as part of your Rollup build. Current stable version is 8.1.3, released under the @web scope on npm. Enables integration of Workbox's generateSW and injectManifest modes directly into Rollup's build pipeline, with optional console output customization and automatic bundling of service worker code via esbuild when using injectManifest. Key differentiator: seamless Rollup integration vs standalone workbox-build CLI or webpack plugin. Part of the modernweb-dev/web project. Releases are patch-level; no major changes in recent history. Ships TypeScript definitions.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-workbox"],"cli":null},"imports":["import { generateSW } from 'rollup-plugin-workbox'","import { injectManifest } from 'rollup-plugin-workbox'","const { generateSW } = require('rollup-plugin-workbox')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.mjs\nimport { generateSW } from 'rollup-plugin-workbox';\n\nexport default {\n  input: 'src/main.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'esm',\n  },\n  plugins: [\n    generateSW({\n      swDest: 'dist/sw.js',\n      globDirectory: 'dist',\n      globPatterns: ['**/*.{js,css,html}'],\n      skipWaiting: true,\n      clientsClaim: true,\n    }),\n  ],\n};","lang":"javascript","description":"Generates a complete service worker using Workbox's generateSW mode during Rollup build. The plugin precaches all JS, CSS, HTML files in dist/.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}