webpack-pwa-manifest
webpack-pwa-manifest copied to clipboard
add hashes to icons
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 ?
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]',
},
},