Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better icons mgmt #45

Closed
Spomky opened this issue Jan 23, 2024 · 3 comments
Closed

Better icons mgmt #45

Spomky opened this issue Jan 23, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Spomky
Copy link
Member

Spomky commented Jan 23, 2024

Description

At the moment, the icons must exist as an asset to be linked to the Manifest file.
Without changing the configuration, it could be great to generate them on-the-fly when compiled

Example

pwa:
    icons:
        - src: "images/pwa/favicon.svg"
          sizes: [48]
          format: 'ico'
        - src: "images/pwa/favicon.svg"
          sizes: [96, 128, 256, 512, 1024]
          format: 'png'
        - src: "images/pwa/favicon.svg"
          sizes: [0]
        - src: "images/pwa/favicon.svg"
          purpose: 'maskable'
          sizes: [0]

Note that only 1 asset really exist

Manifest file in dev/prod

{
    "icons": [
        {
            "src": "/assets/pwa/favicon-xxxhashxxx.ico",
            "format": "image/ico"
            "sizes": "48x48"
        },
        {
            "src": "/assets/pwa/favicon-xxxhashxxx.png",
            "format": "image/png",
            "sizes": "96x96 128x128 256x256 512x512 1024x1024"
        },
        {
            "src": "/assets/pwa/favicon-xxxhashxxx.svg",
            "format": "image/svg",
            "sizes": "any"
        },
        {
            "src": "/assets/pwa/favicon-xxxhashxxx.svg",
            "format": "image/svg",
            "purpose": "maskable",
            "sizes": "any"
        }
    ]
}
@Spomky Spomky added the enhancement New feature or request label Jan 23, 2024
@Spomky Spomky added this to the 1.0.0 milestone Jan 23, 2024
@Spomky Spomky self-assigned this Jan 23, 2024
@Spomky Spomky linked a pull request Jan 27, 2024 that will close this issue
4 tasks
@tacman
Copy link
Contributor

tacman commented Jan 30, 2024

What do you think of having a default favicon in the bundle, with instructions on how to customize? It seems like the first error I always get is favicon failing.

@Spomky
Copy link
Member Author

Spomky commented Feb 9, 2024

Closing as not mature for now.

@Spomky Spomky closed this as completed Feb 9, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants