webpack-pwa-manifest icon indicating copy to clipboard operation
webpack-pwa-manifest copied to clipboard

add hashes to icons

Open novaknole opened this issue 3 years ago • 1 comments

Hi,

This is what I have currently....

icons: [
                {
                    src: utils.resolve('static/assets/images/icons/android-chrome-512x512.png'),
                    sizes: [72, 96, 128, 144, 152, 192, 384, 512],
                    destination: path.join('assets', 'images', 'icons'),
                }
            ]

This generates files such as : icon_72x72.png, icon_96x96.png and so on. What I want to add is hashes into the filenames such as icon_72x72.hash123.png and so on..

Don't we have this feature ?

novaknole avatar Sep 07 '20 18:09 novaknole

Hi. If you want to customize the filenames of the outputs, you should look at the configuration of the loader that loads image files because the "webpack-pwa-manifest" just loads images via those loaders. Below is example:

{
  test: /\.(png|jpg|gif)$/,
  loader: 'file-loader',  
  options: {
    name: '[name].[contenthash].[ext]',
  },
},

Momijiichigo avatar Oct 12 '20 06:10 Momijiichigo