refactor: remove vite-plugin-compression as gzip is enabled in django.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
liqiang-fit2cloud 2025-08-21 10:39:54 +08:00
parent e715e244af
commit aed0168795
3 changed files with 4 additions and 10 deletions

View File

@ -38,6 +38,8 @@ jobs:
if: ${{ contains(github.event.inputs.registry, 'fit2cloud') }}
runs-on: ubuntu-latest
steps:
- name: Clear Work Dir
run: rm -rf -- ./* ./.??*
- name: Check Disk Space
run: df -h
- name: Free Disk Space (Ubuntu)
@ -105,6 +107,8 @@ jobs:
if: ${{ contains(github.event.inputs.registry, 'dockerhub') }}
runs-on: ubuntu-latest
steps:
- name: Clear Work Dir
run: rm -rf -- ./* ./.??*
- name: Check Disk Space
run: df -h
- name: Free Disk Space (Ubuntu)

View File

@ -44,7 +44,6 @@
"screenfull": "^6.0.2",
"sortablejs": "^1.15.6",
"use-element-plus-theme": "^0.0.5",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.2",
"vue": "^3.5.13",
"vue-clipboard3": "^2.0.0",

View File

@ -6,7 +6,6 @@ import vueJsx from '@vitejs/plugin-vue-jsx'
import DefineOptions from 'unplugin-vue-define-options/vite'
import path from 'path'
import { createHtmlPlugin } from 'vite-plugin-html'
import viteCompression from 'vite-plugin-compression'
import fs from 'fs'
// import vueDevTools from 'vite-plugin-vue-devtools'
const envDir = './env'
@ -88,14 +87,6 @@ export default defineConfig((conf: any) => {
DefineOptions(),
createHtmlPlugin({ template: ENV.VITE_ENTRY }),
renameHtmlPlugin(`dist${ENV.VITE_BASE_PATH}`, ENV.VITE_ENTRY),
viteCompression({
// gzip静态资源压缩配置
verbose: true, // 是否在控制台输出压缩结果
disable: false, // 是否禁用压缩
threshold: 10240, // 启用压缩的文件大小限制
algorithm: 'gzip', // 采用的压缩算法
ext: '.gz', // 生成的压缩包后缀
}),
],
server: {
cors: true,