More: https://dev.to/jantimon/html-webpack-plugin-4-has-been-released-125d . Maybe it's not the worst idea to drop support for webpack 3 or less and do the API tweaks highlighted in the post.