1
0
mirror of https://github.com/jumpserver/lina.git synced 2025-05-14 02:54:25 +00:00

perf: Perf optimism build cach

This commit is contained in:
zhaojisen 2025-02-05 11:17:43 +08:00 committed by feng626
parent 7524b6f895
commit b127849388
4 changed files with 18 additions and 12 deletions

View File

@ -56,8 +56,8 @@ export default {
this.accountConfig.connectable = data.total_connectivity_ok_accounts
// TODO
// this.accountConfig.privilegedAccount = data.total_privileged_accounts
// this.accountConfig.regularAccount = data.total_regular_accounts
this.accountConfig.privilegedAccount = data.total_privileged_accounts
this.accountConfig.regularAccount = data.total_regular_accounts
}
}
}

View File

@ -91,6 +91,7 @@ $text-color: #646A73;
padding: 1.25rem;
background-color: #FFF;
overflow: hidden;
border-radius: 0.25rem;
.total-section {
display: flex;

View File

@ -67,12 +67,11 @@ export default {
}
.summary-container {
.account-secret-summary,
.asset-proportion-summary,
.risk-summary,
.mission-summery {
border-radius: 0.5rem;
border-radius: 0.25rem;
}
.account-secret-summary,

View File

@ -95,14 +95,6 @@ module.exports = {
},
extensions: ['.vue', '.js', '.json']
},
plugins: [
new CompressionWebpackPlugin({
algorithm: 'gzip',
test: productionGzipExtensions, // 处理所有匹配此 {RegExp} 的资源
threshold: 10240, // 只处理比这个值大的资源。按字节计算(楼主设置10K以上进行压缩)
minRatio: 0.8 // 只有压缩率比这个值小的资源才会被处理
})
]
},
chainWebpack(config) {
// it can improve the speed of the first screen, it is recommended to turn on preload
@ -153,6 +145,20 @@ module.exports = {
config => config.devtool('cheap-source-map')
)
config
.when(process.env.NODE_ENV === 'production', config => {
config
.plugin('CompressionWebpackPlugin')
.use(CompressionWebpackPlugin, [
{
algorithm: 'gzip',
test: productionGzipExtensions, // 处理所有匹配此 {RegExp} 的资源
threshold: 10240, // 只处理比这个值大的资源。按字节计算(楼主设置10K以上进行压缩)
minRatio: 0.8 // 只有压缩率比这个值小的资源才会被处理
}
])
})
config
.when(process.env.NODE_ENV !== 'development',
config => {