feat: 后台开启gzip压缩

This commit is contained in:
fit2cloud-chenyw 2021-10-25 17:02:36 +08:00
parent b2606600c1
commit c8a0fe4d36
3 changed files with 17 additions and 2 deletions

View File

@ -79,6 +79,12 @@ upload.file.path=/opt/dataease/data/kettle/
dataease.sqlinjection.whitelists=/dataset/table/sqlPreview,/dataset/table/update
#开启压缩 提高响应速度 减少带宽压力
server.compression.enabled=true
server.compression.mime-types=application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
server.compression.min-response-size=1024

View File

@ -439,10 +439,10 @@ div:focus {
}
}
.el-pager li {
/* .blackTheme .el-pager li {
color: var(--TableColor) !important;
background-color: var(--MainBG) !important;
}
} */
/* .blackTheme .el-select-dropdown {
background-color: var(--MainBG) !important;

View File

@ -3,6 +3,7 @@ const path = require('path')
const defaultSettings = require('./src/settings.js')
const CopyWebpackPlugin = require('copy-webpack-plugin')
// const CompressionPlugin = require('compression-webpack-plugin')
function resolve(dir) {
return path.join(__dirname, dir)
@ -79,6 +80,14 @@ module.exports = {
.options({
symbolId: 'icon-[name]'
})
if (process.env.NODE_ENV === 'production') {
/* config.plugin('compressionPlugin').use(new CompressionPlugin({
test: /\.(js|css|less)$/, // 匹配文件名
threshold: 10240, // 对超过10k的数据压缩
minRatio: 0.8,
deleteOriginalAssets: true // 删除源文件
})) */
}
},
css: {
loaderOptions: {