web

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAssetPath

func GetAssetPath(asset string) string

GetAssetPath returns the path to an asset, handling development and production environments

func GetManifestPath

func GetManifestPath(asset string) string

GetManifestPath returns the path to an asset from the manifest

func InitializeAssets

func InitializeAssets(cfg *config.Config) error

InitializeAssets initializes the asset manifest with the provided configuration

Types

type ManifestEntry

type ManifestEntry struct {
	File    string   `json:"file"`
	Src     string   `json:"src,omitempty"`
	CSS     []string `json:"css,omitempty"`
	Imports []string `json:"imports,omitempty"`
}

ManifestEntry represents a single entry in the Vite manifest file

type ViteManifest

type ViteManifest map[string]ManifestEntry

ViteManifest represents the entire Vite manifest file

var (
	// Manifest contains the webpack manifest data for asset versioning
	Manifest ViteManifest
)

Jump to

Keyboard shortcuts

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