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
This commit is contained in:
1 parent
343c48f5ad
commit
ecc419df0a
18 files changed
+370
-214
No files matched your search
@@ -0,0 +1,27 @@
|
||||
#![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()])
|
||||
}
|
||||
Reference in new issue
Block a user