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

add hashes to icons #136

Open
novaknole opened this issue Sep 7, 2020 · 1 comment
Open

add hashes to icons #136

novaknole opened this issue Sep 7, 2020 · 1 comment

Comments

@novaknole
Copy link

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 ?

@Momijiichigo
Copy link

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]',
  },
},

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

2 participants