package main import ( "embed" "io/fs" ) // webDist holds the compiled Mantine SPA. The `all:` prefix makes go:embed // include files whose names start with `_` or `.` too, so a hashed Vite asset is // never silently dropped from the bundle. The build pipeline (web/ -> pnpm build) // writes web/dist before `go build`, so the binary always ships a ready UI with // nothing to serve from disk at runtime. // //go:embed all:web/dist var webDist embed.FS // spaFS returns the embedded SPA rooted at its dist directory, so the file // server sees index.html and assets/ at the root rather than under web/dist/. func spaFS() (fs.FS, error) { return fs.Sub(webDist, "web/dist") }