viteutil

package
v0.85.0-pre.7 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToDevScripts

func ToDevScripts(port int, client_entry string, is_react bool) (template.HTML, error)

Types

type DepsResult

type DepsResult struct {
	ImportPath string
	Modules    []string
	CSSBundles []string
}

type ViteManifest

type ViteManifest map[string]ViteManifestChunk

func ReadViteManifest

func ReadViteManifest(manifest_path string) (ViteManifest, error)

func (ViteManifest) FindAllDeps

func (m ViteManifest) FindAllDeps(import_path string) DepsResult

FindAllDeps recursively finds all of a module's dependencies according to the provided Vite manifest. The import_path arg should be a key in the manifest map. Final result set includes the root module and all of its direct and indirect dependencies.

type ViteManifestChunk

type ViteManifestChunk struct {
	Src            string   `json:"src"`
	File           string   `json:"file"`
	CSS            []string `json:"css"`
	Assets         []string `json:"assets"`
	IsEntry        bool     `json:"isEntry"`
	Name           string   `json:"name"`
	IsDynamicEntry bool     `json:"isDynamicEntry"`
	Imports        []string `json:"imports"`
	DynamicImports []string `json:"dynamicImports"`
}

Jump to

Keyboard shortcuts

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