webpack.config.js
const { resolve } = require('path')
module.exports = {
module: {
rules: [
{
test: /.png$/,
use: {
loader: 'file-loader',
options: {
name: '[name]-[hash].[ext]',
outputPath: 'images',
},
},
},
],
},
}