Files
dioxus/packages/playwright-tests/nested-suspense/src/ssg.rs
T
Evan Almloff ecc419df0a Fix ssg race condition (#3521)
* Fix server crash logging and opening fullstack apps

* Fix race condition during SSG

* move route prerendering into a separate stage

* Fix static site generation with dx serve

* only proxy the fullstack server if ssg is disabled

* test nested-suspense with ssg in playwright
2025-01-08 19:52:10 -08:00

28 lines
800 B
Rust

#![allow(non_snake_case)]
use dioxus::prelude::*;
use nested_suspense::app;
fn main() {
dioxus::LaunchBuilder::new()
.with_cfg(server_only! {
ServeConfig::builder()
.incremental(
IncrementalRendererConfig::new()
.static_dir(
std::env::current_exe()
.unwrap()
.parent()
.unwrap()
.join("public")
)
)
.enable_out_of_order_streaming()
})
.launch(app);
}
#[server(endpoint = "static_routes")]
async fn static_routes() -> Result<Vec<String>, ServerFnError> {
Ok(vec!["/".to_string()])
}