Files
litmus-fe/webpack/webpack.prod.js
2023-05-05 15:00:23 +05:30

30 lines
796 B
JavaScript

/* eslint-disable */
const AnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const CompressionPlugin = require('compression-webpack-plugin');
module.exports = {
mode: 'production',
devtool: 'source-map',
plugins: [
new CompressionPlugin({ exclude: ['config.js'] })
// new AnalyzerPlugin()
],
optimization: {
minimize: true,
moduleIds: 'deterministic',
runtimeChunk: 'single',
splitChunks: {
chunks: 'all',
maxInitialRequests: Infinity,
name: 'vendor',
cacheGroups: {
utilityVendor: {
test: /[\\/]node_modules[\\/](react|react-dom|blockly|@material-ui|jspdf|lodash|moment|moment-timezone|html2canvas|canvg)[\\/]/,
name: 'utility',
enforce: true
}
}
}
}
};