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
@@ -383,18 +383,18 @@ fn build_devserver_router(
|
||||
// For fullstack, liveview, and server, forward all requests to the inner server
|
||||
let address = fullstack_address.unwrap();
|
||||
router = router.nest_service("/",super::proxy::proxy_to(
|
||||
format!("http://{address}").parse().unwrap(),
|
||||
true,
|
||||
|error| {
|
||||
Response::builder()
|
||||
.status(StatusCode::INTERNAL_SERVER_ERROR)
|
||||
.body(Body::from(format!(
|
||||
"Backend connection failed. The backend is likely still starting up. Please try again in a few seconds. Error: {:#?}",
|
||||
error
|
||||
)))
|
||||
.unwrap()
|
||||
},
|
||||
));
|
||||
format!("http://{address}").parse().unwrap(),
|
||||
true,
|
||||
|error| {
|
||||
Response::builder()
|
||||
.status(StatusCode::INTERNAL_SERVER_ERROR)
|
||||
.body(Body::from(format!(
|
||||
"Backend connection failed. The backend is likely still starting up. Please try again in a few seconds. Error: {:#?}",
|
||||
error
|
||||
)))
|
||||
.unwrap()
|
||||
},
|
||||
));
|
||||
} else {
|
||||
// Otherwise, just serve the dir ourselves
|
||||
// Route file service to output the .wasm and assets if this is a web build
|
||||
|
||||
Reference in new issue
Block a user