for dev and production are different(for production it\'s subfolder). What is the good way to build different base with webp
If you have a template option set to an HTML file then Version 2.x of the plug-in will not perform any substitution.
In this case, you will need to modify @stever's answer as follows:
new HtmlWebpackPlugin({
...
template: './src/index.ejs',
baseUrl: process.env.NODE_ENV == 'development'?'/':'/app/'
})
and rename your index.html file to index.ejs