30 lines
796 B
JavaScript
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|