From 2c5de0a713d5147e4b70b25a58c4c66314d8c018 Mon Sep 17 00:00:00 2001 From: Brian May Date: Wed, 16 Apr 2025 07:50:22 +1000 Subject: [PATCH] fix(fullstack): Allow configuration of the public_path (#3419) --- packages/fullstack/src/serve_config.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/fullstack/src/serve_config.rs b/packages/fullstack/src/serve_config.rs index 65b0c7935..34be96f09 100644 --- a/packages/fullstack/src/serve_config.rs +++ b/packages/fullstack/src/serve_config.rs @@ -387,6 +387,10 @@ impl TryInto for ServeConfigBuilder { /// Get the path to the public assets directory to serve static files from pub(crate) fn public_path() -> PathBuf { + if let Ok(path) = std::env::var("DIOXUS_PUBLIC_PATH") { + return PathBuf::from(path); + } + // The CLI always bundles static assets into the exe/public directory std::env::current_exe() .expect("Failed to get current executable path")