// Package miniapp holds the built Mini App front end, so the core binary // serves it without any files next to it. // // The dist directory is the output of "npm run build" in this directory // (or "make miniapp" from the repository root). It is committed, so a // plain "go build" works on a machine without Node.js. After changing // anything under src, rebuild and commit dist together with the change. package miniapp import ( "embed" "io/fs" ) //go:embed all:dist var dist embed.FS // FS returns the built app, with index.html at its root. func FS() fs.FS { sub, err := fs.Sub(dist, "dist") if err != nil { panic(err) // the directory is embedded at build time } return sub }