Improve the base_path story (#2381)

* Improve the base_path story

* allow base path routes without trailing slash

* remove note about trailing /

* fix clippy empty docs

---------

Co-authored-by: Evan Almloff <evanalmloff@gmail.com>
This commit is contained in:
Drew Pirrone-BrusseandEvan Almloff authored and GitHub committed 2024-05-03 13:38:07 -05:00
1 parent 472031d1f5
commit 010dcf9533
6 files changed
+31 -21

No files matched your search

+1 -1
View File
@@ -571,7 +571,7 @@ pub fn gen_page(config: &CrateConfig, manifest: Option<&AssetManifest>, serve: b
}
let base_path = match &config.dioxus_config.web.app.base_path {
Some(path) => path,
Some(path) => path.trim_matches('/'),
None => ".",
};
let app_name = &config.dioxus_config.application.name;