Fix assets with odd extensions and fix race condition with duplicate assets with different sources (#4436)
This commit is contained in:
1 parent
9478525dd0
commit
71b00ab171
6 files changed
+19
-10
No files matched your search
@@ -152,7 +152,10 @@ pub fn add_hash_to_asset(asset: &mut BundledAsset) {
|
||||
};
|
||||
|
||||
if let Some(ext) = ext {
|
||||
bundled_path.set_extension(ext);
|
||||
// Push the extension to the bundled path. There may be multiple extensions (e.g. .js.map)
|
||||
// with one left after the file_stem is extracted above so we need to push the extension
|
||||
// instead of setting it
|
||||
bundled_path.as_mut_os_string().push(format!(".{ext}"));
|
||||
}
|
||||
|
||||
let bundled_path = bundled_path.to_string_lossy().to_string();
|
||||
|
||||
Reference in new issue
Block a user