Add build flag for production UI dist output embed.

This commit is contained in:
2025-01-25 18:41:34 -07:00
parent a3ac233f39
commit 8c8ec659a9
4 changed files with 34 additions and 21 deletions

View File

@@ -1,20 +1,12 @@
// +build prod
//go:build prod
package server
package main
import (
"embed"
"io/fs"
"github.com/smjklake/glancr/ui"
"io/fs"
)
//go:embed frontend/dist
var embedFrontend embed.FS
func getFrontendAssets() fs.FS {
f, err := fs.Sub(embedFrontend, "ui/dist")
if err != nil {
panic(err)
}
return f
func getUIAssets() fs.FS {
return ui.GetUIFS()
}