A minimal Webpack plugin wrapper around Workbox (v6+) to generate a service worker that precaches static assets. Current stable version is 1.0.0, which follows semantic versioning. Works with Webpack 4 and 5, and ships TypeScript type definitions. Key differentiators: zero-config setup (just add the plugin), optional logging controls, and development mode support with proper cleanup of stale service workers.
npm install service-worker-webpackVerified import paths — ran on the pinned version, not inferred.
Adds a service worker that precaches all output static assets using Workbox, with minimal configuration.
Set enableInDevelopment: true in the plugin options during debugging, or accept that caching is disabled in development.
Explicitly set enableWorkboxLogging: false to suppress all workbox logs regardless of mode.
Switch to workbox-webpack-plugin if custom swSrc is required.
Upgrade webpack to ^4.37.0 || ^5.9.0.
npm install --save-dev service-worker-webpack
Change import to: const { ServiceWorkerPlugin } = require('service-worker-webpack');Use webpack's optimize.splitChunks configuration instead.
No dependency data recorded yet.