Bladeren bron

Fix assets folder workspace (#2821)

* Fix the asset folder location in workspaces

* Fix where the asset folder is copied to in fullstack builds
Evan Almloff 10 maanden geleden
bovenliggende
commit
f10ba975ba
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 1 1
      packages/cli/src/builder/cargo.rs
  2. 1 1
      packages/cli/src/dioxus_crate.rs

+ 1 - 1
packages/cli/src/builder/cargo.rs

@@ -236,7 +236,7 @@ impl BuildRequest {
 
     pub fn copy_assets_dir(&self) -> anyhow::Result<()> {
         tracing::info!("Copying public assets to the output directory...");
-        let out_dir = self.dioxus_crate.out_dir();
+        let out_dir = self.target_out_dir();
         let asset_dir = self.dioxus_crate.asset_dir();
 
         if asset_dir.is_dir() {

+ 1 - 1
packages/cli/src/dioxus_crate.rs

@@ -180,7 +180,7 @@ impl DioxusCrate {
     /// Compose an asset directory. Represents the typical "public" directory
     /// with publicly available resources (configurable in the `Dioxus.toml`).
     pub fn asset_dir(&self) -> PathBuf {
-        self.workspace_dir()
+        self.crate_dir()
             .join(&self.dioxus_config.application.asset_dir)
     }