A small yyyy.mm.dd.hh.mm mark beside the edition line, baked in at build time — and the deploy builds moments before it ships, so the stamp reads as deploy time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
21 lines
515 B
TypeScript
21 lines
515 B
TypeScript
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),
|
|
},
|
|
});
|