From f10ba975ba4d673c5422955cfad92456005be034 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Mon, 12 Aug 2024 21:52:33 +0200 Subject: [PATCH] Fix assets folder workspace (#2821) * Fix the asset folder location in workspaces * Fix where the asset folder is copied to in fullstack builds --- packages/cli/src/builder/cargo.rs | 2 +- packages/cli/src/dioxus_crate.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/builder/cargo.rs b/packages/cli/src/builder/cargo.rs index 9bafa456f2..0ca178626b 100644 --- a/packages/cli/src/builder/cargo.rs +++ b/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() { diff --git a/packages/cli/src/dioxus_crate.rs b/packages/cli/src/dioxus_crate.rs index 22818295fb..8e63efe6fe 100644 --- a/packages/cli/src/dioxus_crate.rs +++ b/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) }