import adapter from "@sveltejs/adapter-node"; import path from "node:path"; import { fileURLToPath } from "node:url"; const monorepoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../.."); /** @type {import("@sveltejs/kit").Config} */ const config = { compilerOptions: { // Force runes mode for the project, except for libraries. Can be removed in svelte 6. runes: ({ filename }) => filename.split(/[/\\]/).includes("node_modules") ? undefined : true }, kit: { // svelte-kit sync / $env/static/* use kit.env.dir (not Vite envDir). env: { dir: monorepoRoot }, // Node server: hooks.server.ts (CSP/HSTS/redirects), +page.server.ts, +server.ts require SSR. // Do not switch to adapter-static without removing or replacing that request-time surface. adapter: adapter() } }; export default config;