Revert "feat: generate gzip assets during build (#3178)" (#3219)
This reverts commit 1bdbfa66852b3b843f3b1c91e78aee9154c071cf.
diff --git a/e2e/server/nginx.conf b/e2e/server/nginx.conf
index ebb0f3c..1fde87e 100644
--- a/e2e/server/nginx.conf
+++ b/e2e/server/nginx.conf
@@ -19,13 +19,13 @@
listen 6174;
location /ui {
- rewrite ^/ui$ /ui/ permanent;
+ rewrite ^/ui$ /ui/ permanent;
}
location /ui/ {
alias /usr/share/nginx/html/;
- gzip_static always;
- error_page 404 /ui/index.html;
+ index index.html;
+ try_files $uri $uri/ /ui/index.html;
}
location / {
diff --git a/package.json b/package.json
index 5d551c6..3e7e792 100644
--- a/package.json
+++ b/package.json
@@ -89,7 +89,6 @@
"unplugin-icons": "^22.1.0",
"unplugin-info": "^1.2.2",
"vite": "^6.3.5",
- "vite-plugin-compression2": "^2.2.0",
"vite-tsconfig-paths": "^5.1.4",
"yaml": "^2.7.1"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 6520a89..36fa632 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -231,9 +231,6 @@
vite:
specifier: ^6.3.5
version: 6.3.5(@types/node@22.14.1)(jiti@2.4.2)(sugarss@4.0.1(postcss@8.5.3))(tsx@4.19.3)(yaml@2.7.1)
- vite-plugin-compression2:
- specifier: ^2.2.0
- version: 2.2.0(rollup@4.40.0)
vite-tsconfig-paths:
specifier: ^5.1.4
version: 5.1.4(typescript@5.8.3)(vite@6.3.5(@types/node@22.14.1)(jiti@2.4.2)(sugarss@4.0.1(postcss@8.5.3))(tsx@4.19.3)(yaml@2.7.1))
@@ -981,15 +978,6 @@
react: '>=16.9.0'
react-dom: '>=16.9.0'
- '@rollup/pluginutils@5.2.0':
- resolution: {integrity: sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==}
- engines: {node: '>=14.0.0'}
- peerDependencies:
- rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
- peerDependenciesMeta:
- rollup:
- optional: true
-
'@rollup/rollup-android-arm-eabi@4.40.0':
resolution: {integrity: sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==}
cpu: [arm]
@@ -2129,9 +2117,6 @@
resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==}
engines: {node: '>=4.0'}
- estree-walker@2.0.2:
- resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
-
esutils@2.0.3:
resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
engines: {node: '>=0.10.0'}
@@ -3641,9 +3626,6 @@
tabbable@6.2.0:
resolution: {integrity: sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==}
- tar-mini@0.2.0:
- resolution: {integrity: sha512-+qfUHz700DWnRutdUsxRRVZ38G1Qr27OetwaMYTdg8hcPxf46U0S1Zf76dQMWRBmusOt2ZCK5kbIaiLkoGO7WQ==}
-
throttle-debounce@3.0.1:
resolution: {integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==}
engines: {node: '>=10'}
@@ -3894,9 +3876,6 @@
resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==}
hasBin: true
- vite-plugin-compression2@2.2.0:
- resolution: {integrity: sha512-7BZlU2mBHbqoBGy0ARkn3tv/7LC/2h8ewVDpG/cyH8iSzLw6E/yH6P4oBOEvchkQxNpl+B5W6rFR5fdSwfDhMA==}
-
vite-tsconfig-paths@5.1.4:
resolution: {integrity: sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==}
peerDependencies:
@@ -4925,14 +4904,6 @@
react: 19.1.0
react-dom: 19.1.0(react@19.1.0)
- '@rollup/pluginutils@5.2.0(rollup@4.40.0)':
- dependencies:
- '@types/estree': 1.0.7
- estree-walker: 2.0.2
- picomatch: 4.0.2
- optionalDependencies:
- rollup: 4.40.0
-
'@rollup/rollup-android-arm-eabi@4.40.0':
optional: true
@@ -6292,8 +6263,6 @@
estraverse@5.3.0: {}
- estree-walker@2.0.2: {}
-
esutils@2.0.3: {}
eventemitter3@5.0.1: {}
@@ -7926,8 +7895,6 @@
tabbable@6.2.0: {}
- tar-mini@0.2.0: {}
-
throttle-debounce@3.0.1: {}
throttle-debounce@5.0.2: {}
@@ -8166,13 +8133,6 @@
uuid@8.3.2: {}
- vite-plugin-compression2@2.2.0(rollup@4.40.0):
- dependencies:
- '@rollup/pluginutils': 5.2.0(rollup@4.40.0)
- tar-mini: 0.2.0
- transitivePeerDependencies:
- - rollup
-
vite-tsconfig-paths@5.1.4(typescript@5.8.3)(vite@6.3.5(@types/node@22.14.1)(jiti@2.4.2)(sugarss@4.0.1(postcss@8.5.3))(tsx@4.19.3)(yaml@2.7.1)):
dependencies:
debug: 4.4.0
diff --git a/vite.config.ts b/vite.config.ts
index 290bbc2..8165d19 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -22,7 +22,6 @@
import UnpluginIcons from 'unplugin-icons/vite';
import UnpluginInfo from 'unplugin-info/vite';
import { defineConfig } from 'vite';
-import { compression } from 'vite-plugin-compression2';
import tsconfigPaths from 'vite-tsconfig-paths';
import { API_PREFIX, BASE_PATH } from './src/config/constant';
@@ -99,10 +98,6 @@
react({
plugins: [observerPlugin() as never],
}),
- compression({
- algorithms: ['gzip'],
- deleteOriginalAssets: true,
- }),
],
css: {
postcss: {