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-7/

Service Worker Precache Guard

A build helper that configures service worker generation to stay safe during repeated webpack builds.

Capabilities

Excludes generated assets from precache

  • When building, the precache manifest omits the service worker file and any manifest/runtime chunks emitted by the plugin itself, even though they appear in compilation assets. @test

Warns on repeated invocation

  • Running the plugin more than once in the same compiler lifecycle triggers a single warning that stale precache data may be produced. @test

Tracks prior plugin outputs across builds

  • During watch-mode rebuilds, the plugin remembers any asset names it emitted previously and excludes them from the next manifest without relying on external storage, preventing self-precaching. @test

Implementation

@generates

API

/**
 * Returns a configured build plugin that generates a precaching service worker
 * while guarding against self-precaching when builds rerun.
 *
 * @param {object} options
 * @param {string} options.swDest Absolute or output-relative path for the service worker bundle.
 * @param {string} [options.publicPath] Base URL for emitted assets.
 * @param {boolean} [options.watchMode] Indicates the compiler runs in watch mode.
 * @returns {object} A webpack-compatible plugin instance ready to be added to a config.
 */
function createSwPlugin(options) {}

Dependencies { .dependencies }

workbox-webpack-plugin { .dependency }

Generates a service worker with precache and runtime caching support for webpack builds.

Version

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