CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-workbox-webpack-plugin

tessl install tessl/npm-workbox-webpack-plugin@7.3.0

A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.

Agent Success

Agent success rate when using this tile

80%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.19x

Baseline

Agent success rate without this tile

67%

task.mdevals/scenario-8/

Filtered Precache Build Helper

Configure a webpack build helper that emits a service worker with a precache manifest limited to approved assets and URLs.

Capabilities

Filters assets by chunk and extension

  • When the build outputs hashed .js and .css files for chunks named app and vendor, the precache manifest contains those URLs with revisions while excluding any admin chunk files and .map assets. @test

Enforces precache size ceiling

  • Assets larger than the provided byte limit are omitted from the precache manifest while smaller assets remain. @test

Uses provided public paths

  • Public URLs in the precache manifest honor the configured publicPath, including trailing slash handling, and do not duplicate slashes. @test

Implementation

@generates

API

/**
 * Creates a webpack plugin instance that generates a service worker with a filtered precache manifest.
 *
 * @param {Object} options
 * @param {string} options.publicPath - Base URL prefix applied to manifest entries.
 * @param {string[]} options.allowedChunks - Chunk names to include in precaching (e.g., ["app", "vendor"]).
 * @param {string[]} [options.deniedChunks] - Chunk names to exclude even if present in the build.
 * @param {number} options.maxFileSizeBytes - Maximum file size allowed for precached assets.
 * @returns {any} Configured plugin ready to be added to a webpack config.
 */
export function createFilteredPrecachePlugin(options);

Dependencies { .dependencies }

workbox-webpack-plugin { .dependency }

Provides build-time generation of service workers with asset discovery, filtering, and precache manifest output.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/workbox-webpack-plugin@7.3.x
tile.json