Documentation
¶
Overview ¶
Package runtime embeds the solid-js client runtime so that bundling a Solid application needs no npm install and no node_modules directory.
The embedded files are not committed by hand. Run
go generate ./runtime
to fetch the pinned release. Transform output is coupled to the runtime version, so changing Version means re-running the test suite.
Use github.com/lilybw/go-solid-compiler/esbuildsolid.Runtime to serve these files to esbuild; Config.Resolve is the underlying lookup for other bundlers.
Index ¶
Constants ¶
const Version = "1.9.14"
Version is the solid-js release this runtime was vendored from.
Variables ¶
This section is empty.
Functions ¶
func Available ¶
func Available() bool
Available reports whether the embedded runtime has been populated by go generate.
func Files ¶
func Files() []string
Files lists the embedded module paths, which is useful for diagnostics.
func Handles ¶ added in v0.2.0
Handles reports whether a specifier is served by the embedded runtime.
func Specifiers ¶ added in v0.2.0
func Specifiers() []string
Specifiers lists the import specifiers the embedded runtime serves.
Types ¶
type Config ¶
type Config struct {
// Development serves the development builds, which carry Solid's runtime
// warnings. Entry points without a development build fall back to the
// production one.
Development bool
// Override replaces a module's source entirely, keyed by import specifier.
// It is the escape hatch for pinning a different solid-js version without
// abandoning the embedded runtime.
Override map[string]string
}
Config selects which build to serve.