Given an entry/output like
entry: {
app: 'src/client/app.js',
unauthApp.js: 'src/client/unauth.js'
},
output: {
path: 'dist',
filename: 'scripts/[name]-[chunkhash].js'
},
...
plugins: [
new HtmlWebpackPlugin({
filename: 'views/index.html'
}),
new HtmlWebpackPlugin({
filename: 'views/index-inauth.html'
})
]
is it possible using two instances of HtmlWebpackPlugin
to put the app
script into one template and the unauthApp
script into the other. So far all I have been able to do is put both scripts in both. I'm also playing with using htmlWebpackTemplate
so perhaps there is an option there I have not seen.
webpack@^4.6.0