Spaces:
Building
Building
File size: 243 Bytes
f152ae2 |
1 2 3 4 5 6 7 8 9 |
import compression from "http-compression";
import type { PreviewServer, ViteDevServer } from "vite";
export function compressionServerHook<T extends ViteDevServer | PreviewServer>(
server: T,
) {
server.middlewares.use(compression());
}
|