vite-static 0.4.0

Embed Vite chunks into your Rust application and query them individually.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use vite_static::{HtmlIntegration, Manifest};

#[derive(Manifest)]
#[vite_dist = "examples/vite-project/dist"]
struct MyViteStatic;

fn main() {
    let html = HtmlIntegration::new(MyViteStatic.boxed())
        .import("src/entry1.js")
        .import("src/entry2.js")
        .build();

    eprintln!("html:\n{html}");
}