import adapter from '@sveltejs/adapter-node'; import { sveltekit } from '@sveltejs/kit/vite'; import { defineConfig } from 'vite'; import { createHash } from 'node:crypto'; import { readFileSync } from 'node:fs'; /** knotless-serve, which `vite dev` hands what it answers itself. */ const serve = process.env.KNOTLESS_SERVE ?? 'http://127.0.0.1:2590'; /** The hash of the script app.html runs before the page is drawn, which lets it run: taken from app.html as it is, so it cannot fall out of step. */ const page = readFileSync(new URL('./src/app.html', import.meta.url), 'utf8'); const inline = page.match(/