Expand description
A Rust library for parsing and working with Vite build manifest files.
Vite generates a manifest.json file during build that maps original source files to their corresponding output files, including information about dependencies, CSS files, and chunk relationships.
§Example
use vite_manifest::{parse_manifest, ManifestChunk};
let json = r#"{
"src/main.js": {
"file": "assets/main-abc123.js",
"src": "src/main.js",
"isEntry": true,
"css": ["assets/main-def456.css"]
}
}"#;
let manifest = parse_manifest(json)?;
let main_chunk = manifest.manifest().get("src/main.js").unwrap();
println!("Output file: {}", main_chunk.file);Structs§
Functions§
- manifest_
to_ json - Serialize manifest to JSON string
- parse_
manifest - Deserialize manifest from JSON string