const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = merge(common, {
    mode: 'production',
    module: {
        rules: [
            {
                test: /\.css$/,
                use: [
                    {
                        loader: MiniCssExtractPlugin.loader,
                    },
                    'css-loader',
                ],
            },
        ],
    },
    plugins: [
        new MiniCssExtractPlugin({
            filename: 'assets/styles/main.[hash].css',
            chunkFilename: 'assets/styles/[id].[hash].css',
            // ignoreOrder: false,
        }),
    ],
    devtool: 'source-map',
});

const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

module.exports = merge(common, {
    mode: 'production',
    module: {
        rules: [
            {
                test: /\.css$/,
                use: [MiniCssExtractPlugin.loader, 'css-loader'],
            },
        ],
    },
    plugins: [
        new MiniCssExtractPlugin({
            filename: 'assets/styles/main.[hash].css',
            chunkFilename: 'assets/styles/[id].[hash].css',
            // ignoreOrder: false,
        }),
    ],
    devtool: 'source-map',
});

Simplify webpack css module config
Simplify webpack css module config
