Files
mpc/ui/embed_prod.go
T
zeekay 0c6c6cd953 fix(ui): gate //go:embed behind embedui build tag
CI lint was failing because ui/dist/ doesn't exist in a clean checkout.
Default build compiles with no embedded assets. Production builds that
want the bundled dashboard must build with -tags embedui after
`pnpm --dir ui build`.
2025-12-28 12:09:01 -08:00

22 lines
352 B
Go

//go:build embedui
// Package ui embeds the MPC admin dashboard when built with `-tags embedui`.
package ui
import (
"embed"
"io/fs"
)
//go:embed all:dist
var distFS embed.FS
// DistDirFS returns the embedded dist/ tree rooted at "dist".
func DistDirFS() fs.FS {
sub, err := fs.Sub(distFS, "dist")
if err != nil {
panic(err)
}
return sub
}