diff --git a/packages/cli/src/serve/handle.rs b/packages/cli/src/serve/handle.rs index bab073a6d6..fa3aa33dfe 100644 --- a/packages/cli/src/serve/handle.rs +++ b/packages/cli/src/serve/handle.rs @@ -70,13 +70,19 @@ impl AppHandle { start_fullstack_on_address: Option, open_browser: bool, ) -> Result<()> { + let krate = &self.app.build.krate; + // Set the env vars that the clients will expect // These need to be stable within a release version (ie 0.6.0) let mut envs = vec![ (dioxus_cli_config::CLI_ENABLED_ENV, "true".to_string()), + ( + dioxus_cli_config::ALWAYS_ON_TOP_ENV, + krate.settings.always_on_top.unwrap_or(true).to_string(), + ), ( dioxus_cli_config::APP_TITLE_ENV, - self.app.build.krate.config.web.app.title.clone(), + krate.config.web.app.title.clone(), ), ("RUST_BACKTRACE", "1".to_string()), ( @@ -97,7 +103,7 @@ impl AppHandle { ), ]; - if let Some(base_path) = &self.app.build.krate.config.web.app.base_path { + if let Some(base_path) = &krate.config.web.app.base_path { envs.push((dioxus_cli_config::ASSET_ROOT_ENV, base_path.clone())); }