fix(serve): fixed long rebuilds with dx serve

This commit is contained in:
Andrew Voynov committed 2024-02-06 00:27:45 +03:00
1 parent 417cea7569
commit ea9622a75c
9 files changed
+213 -125

No files matched your search

+16
View File
@@ -448,6 +448,22 @@ impl CrateConfig {
self.crate_dir.join(&self.dioxus_config.application.out_dir)
}
/// Compose an out directory for the fullstack platform. See `out_dir()`
/// method.
pub fn fullstack_out_dir(&self) -> PathBuf {
self.crate_dir.join(".dioxus")
}
/// Compose a target directory for the server (fullstack-only?).
pub fn server_target_dir(&self) -> PathBuf {
self.fullstack_out_dir().join("ssr")
}
/// Compose a target directory for the client (fullstack-only?).
pub fn client_target_dir(&self) -> PathBuf {
self.fullstack_out_dir().join("web")
}
pub fn as_example(&mut self, example_name: String) -> &mut Self {
self.executable = ExecutableType::Example(example_name);
self