plugins: [
new HtmlWebpackPlugin({
title: 'Custom template',
// Load a custom template (lodash by default)
template: 'index.html'
})
]
<script>
document.addEventListener("DOMContentLoaded", function() {
document.querySelectorAll('#id1, #id2, #id3').forEach(function(e) {
if(e.value === '') e.value = window.sessionStorage.getItem(e.name, e.value);
e.addEventListener('input', function() {
window.sessionStorage.setItem(e.name, e.value);
})
})
});
</script>