Fix assets with odd extensions and fix race condition with duplicate assets with different sources (#4436)

This commit is contained in:
Evan Almloff authored and GitHub committed 2025-07-18 11:08:18 -07:00
1 parent 9478525dd0
commit 71b00ab171
6 files changed
+19 -10

No files matched your search

+1 -1
View File
@@ -637,7 +637,7 @@ impl AppBuilder {
let asset_dir = self.build.asset_dir();
// Hotpatch asset!() calls
for bundled in res.assets.assets() {
for bundled in res.assets.unique_assets() {
let original_artifacts = self
.artifacts
.as_mut()
+3 -3
View File
@@ -1189,7 +1189,7 @@ impl BuildRequest {
// Create a set of all the paths that new files will be bundled to
let mut keep_bundled_output_paths: HashSet<_> = assets
.assets()
.unique_assets()
.map(|a| asset_dir.join(a.bundled_path()))
.collect();
@@ -1228,7 +1228,7 @@ impl BuildRequest {
let mut assets_to_transfer = vec![];
// Queue the bundled assets
for bundled in assets.assets() {
for bundled in assets.unique_assets() {
let from = PathBuf::from(bundled.absolute_source_path());
let to = asset_dir.join(bundled.bundled_path());
@@ -4310,7 +4310,7 @@ __wbg_init({{module_or_path: "/{}/{wasm_path}"}}).then((wasm) => {{
}
// Inject any resources from manganis into the head
for asset in assets.assets() {
for asset in assets.unique_assets() {
let asset_path = asset.bundled_path();
match asset.options().variant() {
AssetVariant::Css(css_options) => {
+1 -1
View File
@@ -19,7 +19,7 @@ impl BuildAssets {
let manifest = extract_assets_from_file(&self.executable)?;
create_dir_all(&self.destination)?;
for asset in manifest.assets() {
for asset in manifest.unique_assets() {
let source_path = PathBuf::from(asset.absolute_source_path());
let destination_path = self.destination.join(asset.bundled_path());
debug!(