21 lines
671 B
TypeScript
21 lines
671 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const nextConfig: NextConfig = {
|
|
output: "standalone",
|
|
async headers() {
|
|
return [
|
|
{
|
|
// Browsers are supposed to bypass HTTP cache when checking for a new
|
|
// service worker, but that's not reliably honored everywhere - an
|
|
// explicit no-cache header here is the only way to guarantee a sw.js
|
|
// fix actually reaches already-open tabs promptly after a deploy,
|
|
// instead of possibly sitting cached for hours.
|
|
source: "/sw.js",
|
|
headers: [{ key: "Cache-Control", value: "no-cache, no-store, must-revalidate" }],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|