2023-04-08 20:47:51 -05:00
|
|
|
|
|
|
|
#[cfg(target_family = "wasm")]
|
2023-04-07 17:16:43 -05:00
|
|
|
use console_error_panic_hook;
|
2023-04-08 20:47:51 -05:00
|
|
|
|
|
|
|
#[cfg(target_family = "wasm")]
|
2023-04-07 17:16:43 -05:00
|
|
|
use void_fe::void_app;
|
2023-04-08 20:47:51 -05:00
|
|
|
|
|
|
|
#[cfg(target_family = "wasm")]
|
2023-04-07 17:16:43 -05:00
|
|
|
use wasm_logger;
|
|
|
|
|
2023-04-08 20:47:51 -05:00
|
|
|
#[cfg(any(target_family = "unix", target_family = "windows"))]
|
|
|
|
fn main() {
|
|
|
|
print!("You can't run this without targeting web assembly. Try running `dioxus serve`.")
|
|
|
|
}
|
2023-04-07 17:16:43 -05:00
|
|
|
|
2023-04-08 20:47:51 -05:00
|
|
|
#[cfg(target_family = "wasm")]
|
2023-04-07 07:41:48 -05:00
|
|
|
fn main() {
|
2023-04-07 17:16:43 -05:00
|
|
|
// init debug tool for WebAssembly
|
|
|
|
wasm_logger::init(wasm_logger::Config::default());
|
|
|
|
console_error_panic_hook::set_once();
|
|
|
|
|
2023-04-08 20:47:51 -05:00
|
|
|
dioxus_web::launch(void_app::DioxusApp);
|
2023-04-07 07:41:48 -05:00
|
|
|
}
|