I have simple js file
// main-mvc.ts
console.log('hello console');
and in webpack config
entry: {
app: [
'./src/main.ts',
],
mvcapp: [
'./src/main-mvc.ts',
],
},
...
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true,
chunksSortMode: 'none'
}),
new HtmlWebpackPlugin({
filename: 'test.html',
template: 'test.html',
inject: true,
chunks: ['mvcapp'],
chunksSortMode: 'none'
}),
Now when running index.html I can see message on console from the main-mvc.ts file i.e. 'hello console'. But when running test.html the message is not logged.