|
@@ -176,6 +176,7 @@ impl Default for DioxusConfig {
|
|
default_platform: default_platform(),
|
|
default_platform: default_platform(),
|
|
out_dir: out_dir_default(),
|
|
out_dir: out_dir_default(),
|
|
asset_dir: asset_dir_default(),
|
|
asset_dir: asset_dir_default(),
|
|
|
|
+ hot_reload: hot_reload_default(),
|
|
|
|
|
|
#[cfg(feature = "cli")]
|
|
#[cfg(feature = "cli")]
|
|
tools: Default::default(),
|
|
tools: Default::default(),
|
|
@@ -226,6 +227,9 @@ pub struct ApplicationConfig {
|
|
#[serde(default = "asset_dir_default")]
|
|
#[serde(default = "asset_dir_default")]
|
|
pub asset_dir: PathBuf,
|
|
pub asset_dir: PathBuf,
|
|
|
|
|
|
|
|
+ #[serde(default = "hot_reload_default")]
|
|
|
|
+ pub hot_reload: bool,
|
|
|
|
+
|
|
#[cfg(feature = "cli")]
|
|
#[cfg(feature = "cli")]
|
|
#[serde(default)]
|
|
#[serde(default)]
|
|
pub tools: std::collections::HashMap<String, toml::Value>,
|
|
pub tools: std::collections::HashMap<String, toml::Value>,
|
|
@@ -242,6 +246,10 @@ fn default_platform() -> Platform {
|
|
Platform::Web
|
|
Platform::Web
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+fn hot_reload_default() -> bool {
|
|
|
|
+ true
|
|
|
|
+}
|
|
|
|
+
|
|
fn asset_dir_default() -> PathBuf {
|
|
fn asset_dir_default() -> PathBuf {
|
|
PathBuf::from("public")
|
|
PathBuf::from("public")
|
|
}
|
|
}
|