mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
fix(app-proxy): publish source maps with the asset tree (#2457)
This commit is contained in:
1 parent
6163fd5644
commit
a4d039c910
1 file changed
+6
-8
@@ -280,7 +280,6 @@ fn asset_manifest_entries(dist: &Path) -> Result<Vec<String>> {
|
|||||||
);
|
);
|
||||||
let mut entries = collect_files(&assets_dir)?
|
let mut entries = collect_files(&assets_dir)?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|path| !is_source_map_asset(path))
|
|
||||||
.map(|path| {
|
.map(|path| {
|
||||||
path.strip_prefix(dist)
|
path.strip_prefix(dist)
|
||||||
.with_context(|| format!("Failed to relativize {}", path.display()))
|
.with_context(|| format!("Failed to relativize {}", path.display()))
|
||||||
@@ -291,12 +290,6 @@ fn asset_manifest_entries(dist: &Path) -> Result<Vec<String>> {
|
|||||||
Ok(entries)
|
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<()> {
|
async fn upload_assets_step() -> Result<()> {
|
||||||
let client = s3_client(Some(DEFAULT_S3_ENDPOINT)).await?;
|
let client = s3_client(Some(DEFAULT_S3_ENDPOINT)).await?;
|
||||||
let bucket = env::var("STATIC_BUCKET").unwrap_or_else(|_| DEFAULT_STATIC_BUCKET.to_string());
|
let bucket = env::var("STATIC_BUCKET").unwrap_or_else(|_| DEFAULT_STATIC_BUCKET.to_string());
|
||||||
@@ -824,7 +817,12 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
asset_manifest_entries(&dist).unwrap(),
|
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"
|
||||||
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user