Documentation
¶
Index ¶
Constants ¶
View Source
const (
KindDymanicImport = "dynamic-import"
)
Variables ¶
This section is empty.
Functions ¶
func CollectErrors ¶
func CollectErrors(result esbuild.BuildResult) error
func FindAllDependencies ¶
func FindAllDependencies(metafile *ESBuildMetafileSubset, importPath string) []string
FindAllDependencies recursively finds all of an es module's dependencies according to the provided metafile, which is a compatible, marshalable subset of esbuild's standard json metafile output. The importPath arg should be a key in the metafile's Outputs map.
func FindRelativeEntrypointPath ¶
func FindRelativeEntrypointPath(metafile *ESBuildMetafileSubset, entrypointToFind string) (string, error)
Types ¶
type ESBuildMetafileSubset ¶
type ESBuildMetafileSubset struct {
Inputs map[string]struct {
Imports []struct {
Path string `json:"path"`
Kind string `json:"kind"`
} `json:"imports"`
} `json:"inputs"`
Outputs map[string]struct {
Imports []struct {
Path string `json:"path"`
Kind string `json:"kind"`
} `json:"imports"`
EntryPoint string `json:"entryPoint"`
CSSBundle string `json:"cssBundle"`
} `json:"outputs"`
}
func UnmarshalOutput ¶
func UnmarshalOutput(result esbuild.BuildResult) (*ESBuildMetafileSubset, error)
Click to show internal directories.
Click to hide internal directories.