In webpack when configuring the MiniCssExtractPlugin, I don't understand why [name] is always "main"?
plugins: [
new MiniCssExtractPlugin({
filename: 'assets/css/[name].css' // where does the name "main" come from?
})
]
How could I pass a variable in so that [name] is the name of my app and not "main" without hardcoding it in like filename: 'assets/css/myapp.css'
?
Webpack output
config:
module.exports = {
entry: './src/app.js',
output: {
path: utils.resolve('/dist'),
},
The wierd thing is that even Webpack creates the main bundle file as main.js
. Why main?
output
part of your webpack config? – Vitriolicmain.js
. Where is it getting the namemain
from? – Aardwolfmain
(github.com/webpack/webpack/blob/…) :) – Vitriolic