Skip to content

Commit

Permalink
Fix usage of the MiniCssExtractPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
dnlkoch committed Apr 14, 2022
1 parent fbc50c0 commit f60c7d9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,11 @@ module.exports = {
{
test: /\.less|\.css$/,
use: [
MiniCssExtractPlugin.loader,
{
// Creates style nodes from JS strings
loader: 'style-loader'
},
{
// Translates CSS into CommonJS
loader: 'css-loader'
},
{
// Compiles Less to CSS
loader: 'less-loader',
options: {
lessOptions: {
Expand Down Expand Up @@ -71,6 +66,8 @@ module.exports = {
removeComments: true
}
}),
new MiniCssExtractPlugin()
new MiniCssExtractPlugin({
filename: '[name].[contenthash].css'
})
]
};

0 comments on commit f60c7d9

Please sign in to comment.