mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 10:12:51 +00:00
refactor: remove vite-plugin-compression as gzip is enabled in django.
This commit is contained in:
parent
e715e244af
commit
aed0168795
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue