Skip to content

Commit

Permalink
Add asset dest path resolver override (#45878)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #45878

Changelog:
[General][Added] - Add optional `PackagerAsset.resolver` prop so AssetSourceResolver can use it instead of `Platform.OS` to identify where asset is stored on device.

Reviewed By: rshest

Differential Revision: D60447815

fbshipit-source-id: 44fb8510746905ca0cd266144e213c40a3fa86a9
  • Loading branch information
andrewdacenko authored and facebook-github-bot committed Aug 7, 2024
1 parent 5b96e90 commit 3f3a85b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/assets/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

'use strict';

export type AssetDestPathResolver = 'android' | 'generic';

export type PackagerAsset = {
+__packager_asset: boolean,
+fileSystemLocation: string,
Expand All @@ -20,6 +22,7 @@ export type PackagerAsset = {
+hash: string,
+name: string,
+type: string,
+resolver?: AssetDestPathResolver,
...
};

Expand Down

0 comments on commit 3f3a85b

Please sign in to comment.