import { PreviewServer, ViteDevServer } from "vite"; import compression from "http-compression"; export function compressionServerHook( server: T, ) { server.middlewares.use(compression()); }