Documentation
¶
Overview ¶
Package runtime embeds a pinned copy of the solid-js client runtime and resolves imports of it during bundling, so consumers need 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.
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 IsRuntimeModule ¶
IsRuntimeModule reports whether a specifier is served by the embedded runtime.
Types ¶
type Config ¶
type Config struct {
// Fallback is consulted when a specifier is not part of the embedded
// runtime. Returning ("", false) lets the bundler resolve it normally,
// which is what allows a consumer to keep a node_modules directory for
// their own dependencies while still getting solid-js from here.
Fallback func(specifier string) (contents string, ok bool)
// Override replaces an embedded module wholesale, which is the escape
// hatch for a consumer pinned to a different solid-js version.
Override map[string]string
}
Config controls resolution.