mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
This mostly just copies the "Getting started with service workers" guide cited to explain what the schematic itself does and defering to that doc for more info on PWA's and how to actually build one.
951 B
951 B
@angular/pwa
This is a schematic for adding Progress Web App support to an Angular app. Run the schematic with the Angular CLI:
ng add @angular/pwa
This makes a few changes to your project:
- Adds
@angular/service-worker
as a dependency. - Enables service worker builds in the Angular CLI.
- Imports and registers the service worker in the app module.
- Adds a web app manifest.
- Updates the
index.html
file to link to the manifest and set theme colors. - Adds required icons for the manifest.
- Creates a config file
ngsw-config.json
, specifying caching behaviors and other settings.
See Getting started with service workers for more information.