Skip to content

Commit

Permalink
perf: 上游 Bun 标准库问题已修复,重新启用 Brotli 压缩
Browse files Browse the repository at this point in the history
  • Loading branch information
FHU-yezi committed Oct 18, 2024
1 parent 6dace59 commit 6bb9cce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

try_files {path} /index.html
file_server {
# TODO: 由于 Bun 标准库实现问题,暂时禁用 Brotli 压缩
precompressed gzip
precompressed br gzip
}
}

Expand Down
9 changes: 4 additions & 5 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ export default defineConfig({
},
}),
compression({ algorithm: "gzip" }),
// TODO: 由于 Bun 标准库实现问题,暂时禁用 Brotli 压缩
// compression({
// algorithm: "brotliCompress",
// ext: ".br",
// }),
compression({
algorithm: "brotliCompress",
ext: ".br",
}),
],
server: {
proxy: {
Expand Down

0 comments on commit 6bb9cce

Please sign in to comment.