Suppose we have multiple entries as shown below:
entry: {
main: "./app/entry.js",
view: "./app/entry.js",
},
Is there a way to pass the current name (main or view) into entry.js?
An optimal solution would look like this:
new webpack.DefinePlugin({
'_ENTRY_': '[name]'
}),
This is similar to other configuration options, but unfortunately DefinePlugin does not know how to handle this...