- 更新表名和字段名为小写格式 - 修正字段类型以匹配实体类定义 - 新增缺失字段:scheme_type, down_payment_ratio等 - 添加索引优化查询性能 - 完善表和字段注释
29 lines
716 B
TypeScript
29 lines
716 B
TypeScript
import compression from 'vite-plugin-compression';
|
|
|
|
export default (env: any) => {
|
|
const { VITE_BUILD_COMPRESS } = env;
|
|
const plugin: any[] = [];
|
|
if (VITE_BUILD_COMPRESS) {
|
|
const compressList = VITE_BUILD_COMPRESS.split(',');
|
|
if (compressList.includes('gzip')) {
|
|
// http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件
|
|
plugin.push(
|
|
compression({
|
|
ext: '.gz',
|
|
deleteOriginFile: false
|
|
})
|
|
);
|
|
}
|
|
if (compressList.includes('brotli')) {
|
|
plugin.push(
|
|
compression({
|
|
ext: '.br',
|
|
algorithm: 'brotliCompress',
|
|
deleteOriginFile: false
|
|
})
|
|
);
|
|
}
|
|
}
|
|
return plugin;
|
|
};
|