In webpack when configuring the MiniCssExtractPlugin, I don\'t understand why [name] is always \"main\"?
plugins: [
new MiniCssExtractPlugin({
filenam
The [name]
is the name of the entry point.
If the entry point is a String
or Array
webpack will use a a default entry name main, based on https://github.com/webpack/webpack/blob/6f413ae2e63897aef5e1956cb1c351ab33f6dbfe/lib/EntryOptionPlugin.js#L76.
You can provide your entry point as an object,
module.exports = {
entry: { myName: './src/app.js'},
output: {
path: utils.resolve('/dist'),
},
...
}
which will change entry name to myName
.