You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SourceCodeModule returns empty string for bundle root path #10620
The problem this causes is that Image.resolveAssetSource returns relative paths prefixed with file://, and native modules and view managers must manually construct appropriate absolute paths. We should not need to do this for each module that depends on package asset resolution, but instead should just produce the fully qualified URI via JS.
Steps To Reproduce
Produce a bundled app (either debug or release)
In the app, call Image.resolveAssetSource(require('path/to/some/asset.png'))
Notice that the path is file://path/to/some/asset.png
Expected Results
The resolved path should be: <bundleRootPath>/path/to/some/asset.png
CLI version
npx react-native --version
Environment
npx react-native info
Target Platform Version
No response
Target Device(s)
No response
Visual Studio Version
No response
Build Configuration
No response
Snack, code example, screenshot, or link to a repository
Activity
Fixes issues with packaged asset resolution
Fixes issues with packaged asset resolution
Fixes issues with packaged asset resolution
Fixes issues with packaged asset resolution
[PR] Fixes issues with packaged asset resolution (microsoft#10621)
chiaramooney commentedon Jan 9, 2023
Flagging to discuss. Issue has milestone but no assignee.
7 remaining items
Fixes issues with packaged asset resolution
Fixes issues with packaged asset resolution
Fixes issues with packaged asset resolution
Fixes issues with packaged asset resolution
[PR] Fixes issues with packaged asset resolution (microsoft#10621)
[PR] Fixes issues with packaged asset resolution (microsoft#10621)
Fixes issues with packaged asset resolution
Fixes issues with packaged asset resolution (#10621)
Fixes issues with packaged asset resolution (microsoft#10621)