use cli flag instead of feature flag

This commit is contained in:
Evan Almloff committed 2022-06-14 09:47:16 -05:00
1 parent 712d258496
commit fb7ea5915b
6 files changed
+34 -18

No files matched your search

+5
View File
@@ -39,6 +39,11 @@ pub struct ConfigOptsServe {
/// Build platform: support Web & Desktop [default: "default_platform"]
#[clap(long)]
pub platform: Option<String>,
/// Build with hot reloading rsx [default: false]
#[clap(long)]
#[serde(default)]
pub hot_reload: bool,
}
/// Ensure the given value for `--public-url` is formatted correctly.
+3 -1
View File
@@ -18,7 +18,9 @@ impl Serve {
let mut crate_config = crate::CrateConfig::new()?;
// change the relase state.
crate_config.with_release(self.serve.release);
crate_config
.with_release(self.serve.release)
.with_hot_reload(self.serve.hot_reload);
if self.serve.example.is_some() {
crate_config.as_example(self.serve.example.unwrap());