Skip to content

Commit 9383d11

Browse files
committed
use fflate instead of pako
1 parent 1413bbb commit 9383d11

File tree

4 files changed

+11
-20
lines changed

4 files changed

+11
-20
lines changed

tools/server/public/index.html.gz

43.2 KB
Binary file not shown.

tools/server/webui/package-lock.json

Lines changed: 8 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/server/webui/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,14 @@
4141
"@eslint/js": "^9.17.0",
4242
"@types/markdown-it": "^14.1.2",
4343
"@types/node": "^22.13.1",
44-
"@types/pako": "^2.0.3",
4544
"@types/react": "^18.3.18",
4645
"@types/react-dom": "^18.3.5",
4746
"@vitejs/plugin-react": "^4.3.4",
4847
"eslint": "^9.17.0",
4948
"eslint-plugin-react-hooks": "^5.0.0",
5049
"eslint-plugin-react-refresh": "^0.4.16",
50+
"fflate": "^0.8.2",
5151
"globals": "^15.14.0",
52-
"pako": "^2.1.0",
5352
"prettier": "^3.4.2",
5453
"sass-embedded": "^1.83.4",
5554
"typescript": "~5.6.2",

tools/server/webui/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import react from '@vitejs/plugin-react';
33
import { viteSingleFile } from 'vite-plugin-singlefile';
44
import path from 'node:path';
55
import fs from 'node:fs';
6-
import pako from 'pako';
6+
import * as fflate from 'fflate';
77

88
/* eslint-disable */
99

@@ -36,7 +36,7 @@ const BUILD_PLUGINS = [
3636
let content =
3737
GUIDE_FOR_FRONTEND + '\n' + fs.readFileSync(outputIndexHtml, 'utf-8');
3838
content = content.replace(/\r/g, ''); // remove windows-style line endings
39-
const compressed = pako.deflate(content, {
39+
const compressed = fflate.gzipSync(Buffer.from(content, 'utf-8'), {
4040
level: 9,
4141
});
4242

0 commit comments

Comments
 (0)