forked from github/dataease
feat: 后台开启gzip压缩
This commit is contained in:
parent
b2606600c1
commit
c8a0fe4d36
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user