We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd5e39f commit 9fc6adeCopy full SHA for 9fc6ade
examples/server/public/index.html.gz
0 Bytes
examples/server/webui/vite.config.js
@@ -30,6 +30,15 @@ const BUILD_PLUGINS = [
30
const content = GUIDE_FOR_FRONTEND + '\n' + fs.readFileSync(outputIndexHtml, 'utf-8');
31
const compressed = zlib.gzipSync(Buffer.from(content, 'utf-8'), { level: 9 });
32
33
+ // because gzip header contains machine-specific info, we must remove these data from the header
34
+ // timestamp
35
+ compressed[0x4] = 0;
36
+ compressed[0x5] = 0;
37
+ compressed[0x6] = 0;
38
+ compressed[0x7] = 0;
39
+ // OS
40
+ compressed[0x9] = 0;
41
+
42
if (compressed.byteLength > MAX_BUNDLE_SIZE) {
43
throw new Error(
44
`Bundle size is too large (${Math.ceil(compressed.byteLength / 1024)} KB).\n` +
0 commit comments