From a4d039c910e39a3ce9a7ea86e25862b60560f755 Mon Sep 17 00:00:00 2001 From: Hampus Date: Fri, 4 Sep 2026 19:10:30 +0200 Subject: [PATCH] fix(app-proxy): publish source maps with the asset tree (#2457) --- tools/ci/src/app_proxy.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/ci/src/app_proxy.rs b/tools/ci/src/app_proxy.rs index f19f26f1b..d3f3582cb 100644 --- a/tools/ci/src/app_proxy.rs +++ b/tools/ci/src/app_proxy.rs @@ -280,7 +280,6 @@ fn asset_manifest_entries(dist: &Path) -> Result> { ); let mut entries = collect_files(&assets_dir)? .into_iter() - .filter(|path| !is_source_map_asset(path)) .map(|path| { path.strip_prefix(dist) .with_context(|| format!("Failed to relativize {}", path.display())) @@ -291,12 +290,6 @@ fn asset_manifest_entries(dist: &Path) -> Result> { Ok(entries) } -fn is_source_map_asset(path: &Path) -> bool { - path.extension() - .and_then(|ext| ext.to_str()) - .is_some_and(|ext| ext.eq_ignore_ascii_case("map")) -} - async fn upload_assets_step() -> Result<()> { let client = s3_client(Some(DEFAULT_S3_ENDPOINT)).await?; let bucket = env::var("STATIC_BUCKET").unwrap_or_else(|_| DEFAULT_STATIC_BUCKET.to_string()); @@ -824,7 +817,12 @@ mod tests { assert_eq!( asset_manifest_entries(&dist).unwrap(), - vec!["assets/chunks/a.js", "assets/z.js"] + vec![ + "assets/chunks/a.js", + "assets/chunks/a.js.map", + "assets/z.js", + "assets/z.js.map" + ] ); }