2023-07-25 23:00:45 +00:00
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
|
|
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
|
|
|
|
const { merge } = require('webpack-merge')
|
|
|
|
const path = require( 'path' );
|
|
|
|
const common = require('./webpack.common.js')
|
|
|
|
|
|
|
|
module.exports = merge(common, {
|
|
|
|
mode: 'production',
|
2023-08-05 03:47:16 +00:00
|
|
|
devtool: 'source-map',
|
2023-07-25 23:00:45 +00:00
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.(s[ac]ss)$/i,
|
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
'css-loader',
|
|
|
|
'sass-loader',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
'css-loader'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
|
|
|
},
|
|
|
|
optimization: {
|
|
|
|
minimize: true,
|
|
|
|
minimizer: [new CssMinimizerPlugin(), '...'],
|
|
|
|
},
|
|
|
|
performance: {
|
|
|
|
hints: false,
|
|
|
|
maxEntrypointSize: 512000,
|
|
|
|
maxAssetSize: 512000,
|
|
|
|
},
|
2023-08-05 03:47:16 +00:00
|
|
|
plugins: [new MiniCssExtractPlugin()]
|
2023-07-25 23:00:45 +00:00
|
|
|
})
|