import { defineConfig } from "vite"; import { svelte } from "@sveltejs/vite-plugin-svelte"; // Deploys build locally moments before rsync, so build time IS deploy time. const now = new Date(); const pad = (n: number) => String(n).padStart(2, "0"); const stamp = [ now.getFullYear(), pad(now.getMonth() + 1), pad(now.getDate()), pad(now.getHours()), pad(now.getMinutes()), ].join("."); export default defineConfig({ plugins: [svelte()], define: { __BUILD_STAMP__: JSON.stringify(stamp), }, });