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 configures the service worker build plugin to reshape the precache manifest for CDN delivery and offline support.
.map or starting with /admin/ are removed and a warning string lists the removed URLs in the order they were filtered. @test@generates
export interface ManifestEntry {
url: string;
revision?: string | null;
}
export interface PrecacheConfigOptions {
/**
* Base public path (e.g., CDN prefix) to prepend to generated precache URLs.
*/
basePath?: string;
/**
* Offline HTML asset that must always be in the manifest.
*/
offlinePage: { url: string; revision: string };
/**
* Remote font or icon asset to precache without a revision value.
*/
remoteFont: { url: string };
}
/**
* Builds a plugin instance from the service worker tooling dependency that applies
* the manifest rules in this spec and is ready to be placed in a bundler's plugin list.
*/
export function buildPrecachePlugin(options: PrecacheConfigOptions): unknown;
/**
* Standalone manifest hook shared with the plugin for rewriting URLs,
* filtering unwanted assets, and producing warnings.
*/
export function transformManifest(
entries: ManifestEntry[],
options: { basePath?: string }
): Promise<{ manifest: ManifestEntry[]; warnings: string[] }>;
/**
* Returns the manual precache entries that must be injected alongside the generated manifest.
*/
export function manualEntries(options: PrecacheConfigOptions): ManifestEntry[];Provides the service worker build plugin and manifest customization hooks needed to shape the precache list.
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