miniSearch / server /compressionServerHook.ts
github-actions[bot]
Sync to HuggingFace Spaces
f152ae2
raw
history blame contribute delete
243 Bytes
import compression from "http-compression";
import type { PreviewServer, ViteDevServer } from "vite";
export function compressionServerHook<T extends ViteDevServer | PreviewServer>(
server: T,
) {
server.middlewares.use(compression());
}