chatbridge/client/config/webpack.prod.js

39 lines
845 B
JavaScript
Raw Normal View History

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',
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,
},
})