JavaScript
1
Вклад в тег
const buttonItems = document.querySelectorAll('.button-item');
for (let buttonItem of buttonItems) {
buttonItem.addEventListener('click', (e) => e.preventDefault());
}
const buttonItems = document.querySelectorAll('.button-item');
buttonItems.forEach((buttonItem) => buttonItem.addEventListener('click', (e) => e.preventDefault());
{
test: /\.(gif|png|jpe?g|svg)$/i,
type: 'asset/resource',
},
{
test: /\.(ttf|eot|woff2?)$/i,
type: 'asset/resource',
},
output: {
...
assetModuleFilename: pathData => {
const filepath = path.dirname(pathData.filename).split('/').slice(1).join('/');
return `${filepath}/[name][ext]`;
},
},