for dev and production are different(for production it\'s subfolder). What is the good way to build different base with webp
In Webpack 4 I have tried the baseUrl in HtmlWebpackPlugin , but it's never gets parsed in the html. So you need a new plugin called BaseHredWebpackPlugin along with HtmlWebpackPlugin
Webpack.config
new HtmlWebpackPlugin(), //this will create default template
new HtmlWebpackPlugin({
title: 'MyApp' //replace title
}),
new BaseHrefWebpackPlugin({
baseHref: process.env.NODE_ENV == 'development' ? '/' : '/MyApp/'
})
Html
<%= htmlWebpackPlugin.options.title %>