wisemapping-frontend/packages/webapp/webpack.prod.js
Paulo Gustavo Veiga d1ff38fdca Add compression
2021-02-16 01:15:04 -08:00

32 lines
715 B
JavaScript

const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const path = require('path');
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist')
},
optimization: {
minimize: true,
usedExports: true,
splitChunks: {
cacheGroups: {
vendors: {
test: /node_modules\/(?!antd\/).*/,
name: "vendors",
chunks: "all",
},
// This can be your own design library.
antd: {
test: /node_modules\/(antd\/).*/,
name: "antd",
chunks: "all",
},
},
}
}
});