import adapter from '@sveltejs/adapter-static'; import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; import { stripTestId } from './strip-testid.js'; import { createHash } from 'node:crypto'; import { readFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; import { parse } from 'parse5'; // SvelteKit's `kit.csp` hash mode only hashes the inline scripts SvelteKit // itself generates (its bootstrap) — NOT inline scripts authored in app.html. // So we compute the SHA-256 of our anti-FOUC theme-init