// next.config.ts

import type { NextConfig } from "next";
import withSerwistInit from "@serwist/next";

const manualRevision = "v1.0.0";

const withSerwist = withSerwistInit({
  swSrc: "app/sw.ts",
  swDest: "public/sw.js",
  disable: process.env.NODE_ENV === "development",
  cacheOnNavigation: true,
  additionalPrecacheEntries: [
    { url: "/", revision: manualRevision },
    { url: "/schedule", revision: manualRevision },
    { url: "/faq", revision: manualRevision },
    { url: "/info", revision: manualRevision },
    { url: "/emergency", revision: manualRevision },
  ],
});

const nextConfig: NextConfig = {
  output: "standalone",
};

export default withSerwist(nextConfig);