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

Use webpack output path for icons src #23

@dmtrKovalenko

Description

@dmtrKovalenko

I got a trouble using manifest, because output manifest contains absoulute path, not relative to my output path.

  output: {
     publicPath: '/assets/'
  },
  new WebpackPwaManifest({
      background_color: '#ffffff',
      theme_color: '#2196f3',
      start_url: '/',
      icons: [
        {
          src: path.resolve(__dirname, '..', '..', '..', 'public', 'assets', 'icon.png'),
          sizes: [36, 48, 57, 72, 96, 114, 144, 192] // multiple sizes
        }
      ]
    })

manifest.json:

{
      "src": "assets/icon_192x192.7d461de01ff05a5ceb29aaca7ef5695f.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "assets/icon_144x144.8f737a65911f044a30e8ec64a14c6668.png",
      "sizes": "144x144",
      "type": "image/png"
    },
    {
      "src": "assets/icon_114x114.5ed529289e704528d188cf8798650827.png",
      "sizes": "114x114",
      "type": "image/png"
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions