A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
Overall
score
80%
A configuration helper that builds a web app bundle and emits an offline-ready service worker.
@generates
/**
* Creates a webpack configuration that builds the app and emits a service worker with the offline behavior above.
* @param {Object} options
* @param {string} options.entry - Absolute path to the app entry file.
* @param {string} options.outputDir - Absolute output directory for webpack assets.
* @param {string} options.offlinePage - Path (relative to outputDir) to the offline HTML asset to precache and use for navigation fallback.
* @param {string} options.apiBaseUrl - Base URL prefix for API calls requiring network-first handling.
* @param {{url: string, revision: string}[]} [options.additionalEntries] - Extra URLs with revisions that must be precached alongside build assets.
* @returns {import('webpack').Configuration} A webpack config object ready to run.
*/
export function createPwaConfig(options);Generates the service worker, builds the precache manifest, and wires runtime caching routes. @satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-workbox-webpack-pluginevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10