wisemapping-frontend/packages/webapp/webpack.prod.js

32 lines
715 B
JavaScript
Raw Normal View History

2021-02-16 08:43:26 +01:00
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
2021-02-16 10:15:04 +01:00
const path = require('path');
2021-02-16 08:43:26 +01:00
module.exports = merge(common, {
mode: 'production',
devtool: 'source-map',
2021-02-16 10:15:04 +01:00
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist')
},
2021-02-16 08:43:26 +01:00
optimization: {
minimize: true,
2021-02-16 10:15:04 +01:00
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",
},
},
}
}
2021-02-16 08:43:26 +01:00
});