mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-12-22 11:43:48 +01:00
Add compression pluggin
This commit is contained in:
parent
549dfed708
commit
b29b75931e
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wisemapping/mindplot",
|
||||
"version": "0.4.0",
|
||||
"version": "0.4.1",
|
||||
"description": "WiseMapping - Mindplot Canvas Library",
|
||||
"homepage": "http://www.wisemapping.org/",
|
||||
"main": "dist/main.js",
|
||||
@ -42,6 +42,7 @@
|
||||
"@babel/register": "^7.16.0",
|
||||
"babel-loader": "^8.2.2",
|
||||
"clean-webpack-plugin": "^4.0.0-alpha.0",
|
||||
"compression-webpack-plugin": "^9.2.0",
|
||||
"copy-webpack-plugin": "^10.0.0",
|
||||
"core-js": "^3.15.2",
|
||||
"cypress": "^8.4.1",
|
||||
|
@ -1,15 +1,22 @@
|
||||
const { merge } = require('webpack-merge');
|
||||
const CompressionPlugin = require('compression-webpack-plugin');
|
||||
const common = require('./webpack.common');
|
||||
|
||||
const prodConfig = {
|
||||
mode: 'production',
|
||||
devtool: 'source-map',
|
||||
optimization: {
|
||||
minimize: true,
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
minSize: 2000000,
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new CompressionPlugin({
|
||||
test: /\.js(\?.*)?$/i
|
||||
}),
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = merge(common, prodConfig);
|
||||
|
Loading…
Reference in New Issue
Block a user