prefech wasm + JS by default
This commit is contained in:
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) }
|
||||
},
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user