CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-workbox-webpack-plugin

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

Overall
score

80%

Overview
Eval results
Files

task.mdevals/scenario-4/

Service Worker Output Compatibility

Ensure the service worker build setup handles output paths and build-time reporting reliably across webpack environments.

Capabilities

Resolves destination relative to output path

  • Provided webpack output path /app/dist and destination /tmp/custom-sw.js, the emitted service worker ends up under dist/custom-sw.js without writing to /tmp. @test

Chooses compatible build hooks

  • With a compiler exposing a modern asset-processing stage, the plugin is applied through that hook; with only legacy emit hooks available, it falls back without warnings. @test

Logs manifest summary

  • After precache manifest generation, a log entry includes the service worker filename, number of entries, and total bytes cached. @test

Implementation

@generates

API

export interface SwBuildOptions {
  swSrc?: string;
  swDest: string;
  logLevel?: "summary" | "silent";
}

export function attachServiceWorkerBuild(
  compiler: import("webpack").Compiler,
  options: SwBuildOptions
): void;

Dependencies { .dependencies }

workbox-webpack-plugin { .dependency }

Integrates service worker generation into webpack builds, including manifest creation and build-time logging.

Install with Tessl CLI

npx tessl i tessl/npm-workbox-webpack-plugin

tile.json