Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

The url was not resolved for icons in shortcut section. #140

Open
Momijiichigo opened this issue Oct 8, 2020 · 0 comments
Open

The url was not resolved for icons in shortcut section. #140

Momijiichigo opened this issue Oct 8, 2020 · 0 comments

Comments

@Momijiichigo
Copy link

Momijiichigo commented Oct 8, 2020

I wanted my PWA to have shortcut functionality, so I wrote the code below in the part new WebpackPwaManifest({~~~}):

icons: [
        {
          src: path.resolve("./icon/logo.png"),  // the URL resolved
          sizes: [96,192,512],
          type: "image/png"
        },
      ],
shortcuts: [
        {
          name: "shortcut 1",
          short_name: "shortcut 1",
          description: "hello",
          url: "./index.html?call=shortcut&content=shortcut1",
          icons: [
            { 
              src: path.resolve("./icon/icon_96.png"),   // the URL was not resolved
              sizes: "96x96"
            }
          ]
        },
...

The URLs of PWA's icons were resolved(i.e. png files appear in my dist/ folder and my manifest file states the corresponding location).
However the URLs of the icons in the shortcut section in the result file were just the same as the original URL(./icon/icon_96.png), and the corresponding icon files were not created in dist/ folder.
Could you fix this? Thank you for your time! And I apologize for my poor English.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant