-
-
Notifications
You must be signed in to change notification settings - Fork 390
Closed
Description
Dear all,
Could you please help to understand how can I generate separate files based on entry?
My config is:
module.exports = {
mode: 'production',
entry: ['src/one.scss', 'src/two.scss'],
output: {
path: path.resolve(__dirname, '.temp')
},
plugins: [
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: '[name].[hash].css'
})
],
module: {
rules: [
{
test: /\.s?[ac]ss$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
{
loader: 'postcss-loader',
options: {
plugins: () => [require('autoprefixer')],
},
},
{
loader: 'sass-loader',
options: {
includePaths: [
'./src'
]
}
}
]
}
]
}
};So basically I just want to endup with two css files laying under .temp folder: one.css and two.css.
I tried to use based on entry option from the docs but it doesn't seem to work in my case.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels