refactor(cli-config): modified CrateConfig struct

`out_dir` and `asset_dir` are now methods, because they derive from
`crate_dir` and `dioxus_config`.
This commit is contained in:
Andrew Voynov committed 2024-01-30 23:23:00 +03:00
1 parent fa933e35ab
commit 48957b11d8
7 files changed
+49 -42

No files matched your search

+2 -2
View File
@@ -290,7 +290,7 @@ async fn setup_router(
std::fs::read_to_string(
file_service_config
.crate_dir
.join(file_service_config.out_dir)
.join(file_service_config.out_dir())
.join("index.html"),
)
.ok()
@@ -315,7 +315,7 @@ async fn setup_router(
Ok(response)
},
)
.service(ServeDir::new(config.crate_dir.join(&config.out_dir)));
.service(ServeDir::new(config.crate_dir.join(config.out_dir())));
// Setup websocket
let mut router = Router::new().route("/_dioxus/ws", get(ws_handler));