25 lines
474 B
Go
25 lines
474 B
Go
//go:build embed_web
|
|
|
|
package webassets
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
)
|
|
|
|
// The all: prefix is required because Vite emits helper chunks whose names
|
|
// begin with an underscore, which the default directory pattern excludes.
|
|
//
|
|
//go:embed all:admin/dist all:portal/dist all:setup/dist
|
|
var FS embed.FS
|
|
|
|
const Embedded = true
|
|
|
|
func ReadFile(name string) ([]byte, error) {
|
|
return FS.ReadFile(name)
|
|
}
|
|
|
|
func ReadDir(name string) ([]fs.DirEntry, error) {
|
|
return FS.ReadDir(name)
|
|
}
|