import { defineConfig } from "vite";
import { fileURLToPath } from "node:url";
import path from "node:path";

const root = path.dirname(fileURLToPath(import.meta.url));

export default defineConfig({
  base: "./",
  server: { port: 4190 },
  build: {
    rollupOptions: {
      input: {
        main: path.resolve(root, "index.html"),
        faq: path.resolve(root, "faq.html"),
        blog: path.resolve(root, "blog/index.html"),
        blogCostOfPaperwork: path.resolve(root, "blog/cost-of-paperwork/index.html"),
        blogStormChecklist: path.resolve(root, "blog/48-hour-storm-checklist/index.html"),
        blogClaimsDenied: path.resolve(root, "blog/why-claims-get-denied/index.html"),
        terms: path.resolve(root, "terms/index.html"),
      },
      output: {
        manualChunks: { three: ["three"], gsap: ["gsap"] },
      },
    },
  },
});
