38 lines
845 B
JavaScript
38 lines
845 B
JavaScript
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',
|
|
devtool: false,
|
|
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,
|
|
},
|
|
})
|