diff --git a/src/server.ts b/src/server.ts index 3ece061..8698e5e 100644 --- a/src/server.ts +++ b/src/server.ts @@ -206,6 +206,11 @@ async function start() { root: path.join(__dirname, "..", "dist-client"), prefix: "/", wildcard: false, + // The plugin's own Cache-Control management must be OFF or it + // overwrites the setHeaders values below with "public, max-age=0" + // (README: "To provide a custom Cache-Control header, set this option + // to false"). ETags stay on, so no-cache still revalidates cheaply. + cacheControl: false, // Deploy-skew caching contract (per the Vite deploy guide): // - /assets/* names are content-hashed → safe to cache forever // (a changed file always gets a NEW name, so "immutable" is correct).