Sitelet https://web.archive.org/web/20240920155423/https://angular.dev/cli/generate/service-worker/
CLI

generate service-worker

Command
ng generate service-worker

Pass this schematic to the "run" command to create a service worker

Options

project

The name of the project.

Value Typestring
target

The target to apply service worker to.

Value TypestringDefaultbuild
Jump to details