fix: add timestamp to tailwind output only on debug
This commit is contained in:
parent
289d5be4a3
commit
09cfec65ec
16
src/main.rs
16
src/main.rs
@ -111,12 +111,18 @@ fn index() -> Markup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn skeleton(children: Markup) -> Markup {
|
fn skeleton(children: Markup) -> Markup {
|
||||||
let ms = SystemTime::now()
|
// add a timestamp on debug builds
|
||||||
.duration_since(UNIX_EPOCH)
|
let tailwind_path = if cfg!(debug_assertions) {
|
||||||
.unwrap()
|
let ms = SystemTime::now()
|
||||||
.as_millis();
|
.duration_since(UNIX_EPOCH)
|
||||||
|
.unwrap()
|
||||||
|
.as_millis();
|
||||||
|
|
||||||
|
format!("/public/output.css?t={}", ms)
|
||||||
|
} else {
|
||||||
|
String::from("/public/output.css")
|
||||||
|
};
|
||||||
|
|
||||||
let tailwind_path = format!("/public/output.css?t={}", ms);
|
|
||||||
html! {
|
html! {
|
||||||
(DOCTYPE)
|
(DOCTYPE)
|
||||||
html lang="es" {
|
html lang="es" {
|
||||||
|
Loading…
Reference in New Issue
Block a user