Skip to content

Commit 42986f2

Browse files
tido64meta-codesync[bot]
authored andcommitted
fix(android): support unstable_path query param in asset URLs (#55072)
Summary: Syncs `getAndroidResourceIdentifier` implementations between [`/community-cli-plugin/src/commands/bundle/assetPathUtils.js`](https://github.com/facebook/react-native/blob/main/packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js#L72-L79) and [`/assets/path-support.js`](https://github.com/facebook/react-native/blob/main/packages/assets/path-support.js#L77-L85). Ideally, the former should use `react-native/assets-registry` directly so we don't need to sync. ## Changelog: [ANDROID] [FIXED] - Handle `unstable_path` query param in asset URLs Pull Request resolved: #55072 Test Plan: n/a Reviewed By: javache Differential Revision: D90267467 Pulled By: Abbondanzo fbshipit-source-id: f4eb0053c6af02b67f3fb493ae76e290d6b354e5
1 parent 0d27aed commit 42986f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function getResourceIdentifier(asset: PackagerAsset): string {
7575
.toLowerCase()
7676
.replace(/\//g, '_') // Encode folder structure in file name
7777
.replace(/([^a-z0-9_])/g, '') // Remove illegal chars
78-
.replace(/^assets_/, ''); // Remove "assets_" prefix
78+
.replace(/^(?:assets|assetsunstable_path)_/, ''); // Remove "assets_" or "assetsunstable_path_" prefix
7979
}
8080

8181
function getBasePath(asset: PackagerAsset): string {

0 commit comments

Comments
 (0)