Add webpack compression plugin.
This commit is contained in:
parent
fe19a98829
commit
26f8adcd4e
|
@ -1128,6 +1128,16 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"compression-webpack-plugin": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/compression-webpack-plugin/-/compression-webpack-plugin-7.1.2.tgz",
|
||||
"integrity": "sha512-9DKNW6ILLjx+bNBoviHDgLx6swBhWWH9ApClC9sTH2NoFfQM47BapQfovCm9zjD9v1uZwInF5a925FB9ErGQeQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"schema-utils": "^3.0.0",
|
||||
"serialize-javascript": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"devDependencies": {
|
||||
"@types/google-protobuf": "^3.7.4",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"compression-webpack-plugin": "^7.1.2",
|
||||
"html-webpack-plugin": "^4.5.0",
|
||||
"ts-loader": "^8.0.13",
|
||||
"ts-protoc-gen": "^0.14.0",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
const webpack = require('webpack');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
const CompressionPlugin = require("compression-webpack-plugin");
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const path = require('path');
|
||||
|
||||
|
@ -53,6 +54,7 @@ module.exports = {
|
|||
cleanAfterEveryBuildPatterns: ['!templates/**/*'],
|
||||
dry: false
|
||||
}),
|
||||
new CompressionPlugin(),
|
||||
packPage('login.html.tera'),
|
||||
packPage('base.html.tera'),
|
||||
packPage('error.html.tera'),
|
||||
|
|
Loading…
Reference in New Issue