Files
wweir 53d4271813 chore: stop tracking web dist build artifacts
Add /web/dist to .gitignore, untrack the committed vite build output,
and update the embed.go comment to reflect that dist is generated by
the Makefile web target instead of being committed.
2026-08-10 16:29:31 +08:00

23 lines
531 B
Go

// Package web embeds the built admin console frontend into the binary.
// The dist directory is generated by `bun run build` in this directory
// (see the Makefile `web` target, a prerequisite of the sower build).
package web
import (
"embed"
"fmt"
"io/fs"
)
//go:embed all:dist
var dist embed.FS
// Dist returns the embedded frontend filesystem rooted at the dist directory.
func Dist() (fs.FS, error) {
sub, err := fs.Sub(dist, "dist")
if err != nil {
return nil, fmt.Errorf("web dist: %w", err)
}
return sub, nil
}