From 0cc65bf300d5c4267472c314cb58a445879b6de0 Mon Sep 17 00:00:00 2001 From: copygirl Date: Fri, 19 Dec 2025 23:34:00 +0100 Subject: [PATCH] Disable hot reloading on WASM --- Cargo.toml | 2 +- client/Cargo.toml | 3 +++ common/Cargo.toml | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3c66cad..baddc86 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ opt-level = 1 opt-level = 3 [workspace.dependencies] -bevy = { version = "0.17.2", features = [ "serialize", "file_watcher", "embedded_watcher" ] } +bevy = { version = "0.17.2", features = [ "serialize" ] } # lightyear = { version = "0.25.3", features = [ "netcode", "webtransport", "input_native" ] } derive-where = { version = "1.6.0", features = [ "serde" ] } diff --git a/client/Cargo.toml b/client/Cargo.toml index be70ba2..7ad5a7a 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -18,3 +18,6 @@ bevy_fix_cursor_unlock_web = "0.2.0" clap = { version = "4.5.50", features = [ "derive" ] } web-sys = { version = "0.3.81", features = [ "Location", "UrlSearchParams", "Window" ] } + +[package.metadata.bevy_cli] +native.dev.features = ["common/hot_reloading"] diff --git a/common/Cargo.toml b/common/Cargo.toml index 37bcc6d..93678d3 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -12,3 +12,9 @@ derive-where.workspace = true ron.workspace = true serde.workspace = true thiserror.workspace = true + +[features] +hot_reloading = [ + "bevy/file_watcher", + "bevy/embedded_watcher", +]