esbuildutil

package
v0.0.60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: BSD-3-Clause Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	KindDymanicImport = "dynamic-import"
)

Variables

This section is empty.

Functions

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 {
	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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL