1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use Manifest;
// To add vite static, we need to create struct and add `vite_static::Manifest` derive.
// `Manifest` derive macro has options, such as vite_dist.
// Look into documentation, if you want to see all options and descriptions for them.
// You can specify relative path (to Cargo.toml):
// Or you can specify absolute path:
// #[vite_dist = "/absolute/path/to/dist"]
// Or you can use environment variables to specify path:
// #[vite_dist = "env:MY_VITE_STATIC_PATH|/default/path/to/dist"]
;
// Now we are ready to use `MyViteStatic` struct!