-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
Description
I was trying to add some attributes in my script tag and I had to customize generateJSReferences function:
function generateJSReferences(files = [], publicPath = '', attributes = '') {
return files
.map(file => `<script src="${publicPath}${file}" ${attributes}></script>`)
.join('');
}I can call it in my custom template like so: ${generateJSReferences(js, publicPath, 'defer="defer"')}.
Would be nice to have this functionality by default in mini-html-webpack-plugin. What do you think? You can do the same for generateCSSReferences.
sag1v