diff options
| author | Adam Malczewski <[email protected]> | 2026-06-22 11:23:43 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-22 11:23:43 +0900 |
| commit | 54fc4f301cffa538ad30c8c157c73924a2b3955e (patch) | |
| tree | 4f72064eefe18cb4d2ad5bef75244538024e1ebe /src/vite-env.d.ts | |
| parent | 8c4abd54390dc3ad73b88e8b2349118aa61c4b44 (diff) | |
| download | dispatch-web-54fc4f301cffa538ad30c8c157c73924a2b3955e.tar.gz dispatch-web-54fc4f301cffa538ad30c8c157c73924a2b3955e.zip | |
feat: show 5-char git hash next to hamburger for cache-bust detection
Vite define bakes __APP_VERSION__ (git rev-parse --short=5 HEAD) at build
time — survives bundling into the arch package deploy. Falls back to 'dev'
when not in a git repo. Also fixes two noNonNullAssertion warnings in
place.ts.
Diffstat (limited to 'src/vite-env.d.ts')
| -rw-r--r-- | src/vite-env.d.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 4078e74..2a2b515 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -1,2 +1,5 @@ /// <reference types="svelte" /> /// <reference types="vite/client" /> + +/** 5-char git short hash, baked at build time (vite.config.ts `define`). */ +declare const __APP_VERSION__: string; |
