diff --git a/webpack.common.js b/webpack.common.js index 28bb939d..b157fd79 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -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: { @@ -71,6 +66,8 @@ module.exports = { removeComments: true } }), - new MiniCssExtractPlugin() + new MiniCssExtractPlugin({ + filename: '[name].[contenthash].css' + }) ] };