From d9d2c67ae42672e2b209fef281231795be7c0abb Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Wed, 7 Jan 2026 13:47:01 -0800 Subject: [PATCH] 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: https://github.com/facebook/react-native/pull/55072 Test Plan: n/a Reviewed By: javache Differential Revision: D90267467 Pulled By: Abbondanzo fbshipit-source-id: f4eb0053c6af02b67f3fb493ae76e290d6b354e5 --- .../community-cli-plugin/src/commands/bundle/assetPathUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js b/packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js index 6f1aaf532d9..6a3bb680c58 100644 --- a/packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js +++ b/packages/community-cli-plugin/src/commands/bundle/assetPathUtils.js @@ -73,7 +73,7 @@ function getResourceIdentifier(asset: PackagerAsset): string { .toLowerCase() .replace(/\//g, '_') // Encode folder structure in file name .replace(/([^a-z0-9_])/g, '') // Remove illegal chars - .replace(/^assets_/, ''); // Remove "assets_" prefix + .replace(/^(?:assets|assetsunstable_path)_/, ''); // Remove "assets_" or "assetsunstable_path_" prefix } function getBasePath(asset: PackagerAsset): string {