Documentation
¶
Overview ¶
Package browserassets defines the versioned browser bundle manifest emitted by gobeyond build. It keeps Vite's implementation-specific manifest out of production servers and exposes only the assets needed to render a route.
Index ¶
Constants ¶
const APIVersionV1Alpha1 = "gobeyond.browser-assets/v1alpha1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrowserAssets ¶
type BrowserAssets struct {
Bootstrap string `json:"bootstrap,omitempty"`
ModulePreloads []string `json:"modulePreloads"`
Styles []string `json:"styles"`
}
BrowserAssets describes one executable browser entry and its eager assets. Bootstrap is the executable module for this group. For a route entry it is preloaded by the document and imported by the framework bootstrap at runtime.
type Manifest ¶
type Manifest struct {
APIVersion string `json:"apiVersion,omitempty"`
BuildID string `json:"buildId,omitempty"`
Bootstrap BrowserAssets `json:"bootstrapAssets"`
Routes map[string]BrowserAssets `json:"routes"`
ClientScript string `json:"clientScript,omitempty"`
Styles []string `json:"styles,omitempty"`
}
Manifest is the stable route-aware projection of the bundler output. ClientScript and Styles are retained for one compatibility release and are used only by servers that do not understand the route-aware fields.
func LoadRuntimeManifest ¶
LoadRuntimeManifest reads the browser assets embedded in gobeyond build's production runtime envelope and verifies that no artifact crossed builds.