mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 14:02:43 +08:00
The `assets` directory is confusing for the users and commonly users place "assets" which are not meant to be copied but instead processed by the build system. This causes some files both bundled and copied. With this change we rename the `assets` directory to `public` and also move the `favicon.ico` inside this newly created directory.
@angular/pwa
This is a schematic for adding Progressive Web App support to an Angular project. Run the schematic with the Angular CLI:
ng add @angular/pwa --project <project-name>
Executing the command mentioned above will perform the following actions:
- Adds
@angular/service-worker
as a dependency to your project. - Enables service worker builds in the Angular CLI.
- Imports and registers the service worker in the application module.
- Updates the
index.html
file:- Includes a link to add the manifest.webmanifest file.
- Adds a meta tag for
theme-color
.
- Installs icon files to support the installed Progressive Web App (PWA).
- Creates the service worker configuration file called
ngsw-config.json
, specifying caching behaviors and other settings.
See Getting started with service workers for more information.