You can use Html Webpack Plugin to generate html files.
If the default generated html doesn't meet your needs you can supply your own template.
Read template.html, template-utils.js and webpack.config.js.
The template is by default rendered using lodash, do not confuse it with ejs (you can't use <%- include partial.html %>
to include a partial).