Fix compile checks on numerous packages using --all --all-features

This commit is contained in:
Jonathan Kelley committed 2024-01-18 16:27:43 -08:00
1 parent 3506b3ea72
commit d8af9b7ed1
38 files changed
+147 -186

No files matched your search

+12 -2
View File
@@ -20,17 +20,27 @@ pub fn launch(
}
vdom
};
#[cfg(feature = "ssr")]
tokio::runtime::Runtime::new()
.unwrap()
.block_on(async move {
platform_config.launch_server(virtual_dom_factory).await;
});
#[cfg(not(feature = "ssr"))]
{
#[cfg(feature = "web")]
platform_config.launch_web(virtual_dom_factory);
{
// TODO: this should pull the props from the document
let cfg = platform_config.web_cfg.hydrate(true);
dioxus_web::launch::launch_virtual_dom(virtual_dom_factory(), cfg);
}
#[cfg(feature = "desktop")]
platform_config.launch_desktop(virtual_dom_factory);
{
let cfg = platform_config.desktop_cfg;
dioxus_desktop::launch::launch_virtual_dom(virtual_dom_factory(), cfg)
}
}
}