-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Metro local static image paths #33829
Merged
dcalhoun
merged 1 commit into
rnmobile/editor-onboarding-basic-help-4
from
update/fix-metro-local-static-image-paths
Aug 2, 2021
Merged
Fix Metro local static image paths #33829
dcalhoun
merged 1 commit into
rnmobile/editor-onboarding-basic-help-4
from
update/fix-metro-local-static-image-paths
Aug 2, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading local static assets from a different package within a monorepo appears broken in Metro for Android. The below fixes paths to packages within this project to include the necessary `/assets/..` that Metro's server expects to traverse to the correct directory. - https://git.io/JBV4e - https://git.io/JBFon
dcalhoun
added
the
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
label
Aug 2, 2021
Size Change: 0 B Total Size: 1.08 MB ℹ️ View Unchanged
|
7 tasks
AmandaRiu
approved these changes
Aug 2, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works nicely @dcalhoun! Once this is merged I can test it with my branch using a bundled version for Android.
AmandaRiu
added a commit
that referenced
this pull request
Aug 3, 2021
…t 1 (#33790) * Add help menu option to iOS demo app * Add basic help topics bottom sheet * Add help option to Android demo app * Add new help topics icons * Add help topics to main help bottom sheet * Remove unused imports * Optimized new SVG images using https://jakearchibald.github.io/svgomg/ * Add navigation to help detail subsheet * Add react-native and react-navigation to package.json per lint * Fix lint errors * Add images for help detail sections * Add intro to blocks page * Add remaining help detail pages * Link help details to topics * WIP * Remove unnecessary dependency * Cleanup code, remove debugging * Patch to correct issues with asset loading at runtime * Fix lint errors by removing unused imports * Remove extreneous filename extension from import * Rename view property for clarity * Remove memoization * Fix Metro local static image paths (#33829) Loading local static assets from a different package within a monorepo appears broken in Metro for Android. The below fixes paths to packages within this project to include the necessary `/assets/..` that Metro's server expects to traverse to the correct directory. - https://git.io/JBV4e - https://git.io/JBFon Co-authored-by: David Calhoun <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Relates to #33790. Loading local static assets from a different package within a monorepo appears broken in Metro for Android. This issue only occurs when running the Demo application from the
gutenberg
repository. It does not occur within thegutenberg-mobile
repository.The below fixes paths to packages within this project to include the necessary
/assets/..
that Metro's server expects to traverse to the correct directory. This PR includes an alternative approach that leverages Metro middleware configuration, rather than patching third-party code.How has this been tested?
npm run native start:reset
npm run native android
Screenshots
n/a
Types of changes
Bug fix
Checklist:
*.native.js
files for terms that need renaming or removal).