JavaScript
0
Вклад в тег
{
test: /\.(?:|gif|png|jpg|svg)$/,
use: [{
loader: 'file-loader',
options: {
name: `./img/${filename('[ext]')}`
}
}],
},
{
test: /\.(?:|gif|png|jpg|svg)$/,
type: 'asset/resource',
generator: {
filename: () => {
return isDev ? 'img/[name][ext]' : 'img/[name].[contenthash][ext]';
}
}
},