Skip to content

Generate favicon as part of adding PWA service worker #15844

@kmturley

Description

@kmturley

🚀 feature request

Relevant Package

This feature request is for @angular/pwa

Description

When using the command:
ng add @angular/pwa --project *project-name*

it completes a set of tasks including:

  1. Adds the @angular/service-worker package to your project.
  2. Enables service worker build support in the CLI.
  3. Imports and registers the service worker in the app module.
  4. Updates the index.html file:
  5. Includes a link to add the manifest.json file.
  6. Adds meta tags for theme-color.
  7. Installs icon files to support the installed Progressive Web App (PWA).
  8. Creates the service worker configuration file called ngsw-config.json, which specifies the caching behaviors and other settings.

However on step 7, adding the icons files these are generic default Angular icons. In order to replace these developers then need to manually:

  1. Find an icon generator
  2. Upload their image and generate the new code
  3. Download the icons copy/paste into the folder
  4. Copy/paste the icons code into the index.html head tag

Every developer needs to do these steps on every new project. So it would save alot of time if we had an automated solution.

Describe the solution you'd like

The option to include my HQ image file for the icon, which is automatically converted into the various sizes and added used instead of the default Angular icon.

Describe alternatives you've considered

Consider using a webpack plugin or node.js script to generate the icons for us?

Some examples:
https://github.com/jantimon/favicons-webpack-plugin
https://github.com/itgalaxy/favicons

Metadata

Metadata

Assignees

No one assigned

    Labels

    P5The team acknowledges the request but does not plan to address it, it remains open for discussionarea: @angular/pwafeatureIssue that requests a new featurefeature: insufficient votesLabel to add when the not a sufficient number of votes or comments from unique authorshelp wanted

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions