A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
Overall
score
80%
A build helper that outputs a final service worker by merging a developer-authored source file with a generated precache manifest derived from bundler assets.
@generates
/**
* Builds a custom service worker with an injected precache manifest produced from bundler assets.
*/
export interface SwBuildOptions {
swSrc: string;
swDest?: string;
assetsDir: string;
publicPath?: string;
additionalEntries?: Array<{ url: string; revision?: string | null }>;
exclude?: Array<string | RegExp>;
chunkScripts?: string[];
}
export async function buildServiceWorker(options: SwBuildOptions): Promise<{
swPath: string;
manifest: Array<{ url: string; revision: string | null }>;
}>;Custom service worker injection during bundling and precache manifest generation. @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