prefech wasm + JS by default

This commit is contained in:
Evan Almloff committed 2023-03-31 16:16:47 -05:00
1 parent bfcb0f6eab
commit 5ffdb4dbed
2 files changed
+27 -19

No files matched your search

@@ -41,15 +41,12 @@ fn main() {
// If the path is unknown, render the application
.fallback(
move |uri: http::uri::Uri, State(ssr_state): State<SSRState>| {
let rendered = ssr_state.render(
&ServeConfig::new(
App,
AppProps {
route: Some(format!("http://{addr}{uri}")),
},
)
.head(r#"<title>Hello World!</title>"#),
);
let rendered = ssr_state.render(&ServeConfig::new(
App,
AppProps {
route: Some(format!("http://{addr}{uri}")),
},
));
async move { axum::body::Full::from(rendered) }
},
)