-
Notifications
You must be signed in to change notification settings - Fork 636
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
Add XML files to the list of default assets #1348
Closed
Closed
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
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Sep 6, 2024
This pull request was exported from Phabricator. Differential Revision: D62302929 |
Abbondanzo
changed the title
Load XML files on disk by default
Add XML files to the list of default assets
Sep 6, 2024
Abbondanzo
added a commit
to Abbondanzo/react-native
that referenced
this pull request
Sep 6, 2024
Summary: X-link: facebook/metro#1348 Pull Request resolved: facebook#46371 ## Internal Vector drawable image support was added in D59530172 but importing vector drawable asset types was not supported out of the box. It required custom source transformers like the one added in D60021474. This is because Android cannot load vector drawable XML over the network. Vector drawables are compiled by AAPT as part of the build process. Even though Metro can serve XML, it would never load. ## Summary This adds some minor checks in the `AssetSourceResolver` to only attempt loading XML asset types from disk on the Android platform. XML assets like vector drawables are precompiled and cannot be served over the network by Metro. ## Changelog [Android] [Added] - Adds support for importing XML assets as images Differential Revision: D62302929
This pull request was exported from Phabricator. Differential Revision: D62302929 |
Abbondanzo
added a commit
to Abbondanzo/metro
that referenced
this pull request
Sep 6, 2024
Summary: Pull Request resolved: facebook#1348 X-link: facebook/react-native#46371 ## Internal Vector drawable image support was added in D59530172 but importing vector drawable asset types was not supported out of the box. It required custom source transformers like the one added in D60021474. This is because Android cannot load vector drawable XML over the network. Vector drawables are compiled by AAPT as part of the build process. Even though Metro can serve XML, it would never load. ## Summary This adds some minor checks in the `AssetSourceResolver` to only attempt loading XML asset types from disk on the Android platform. XML assets like vector drawables are precompiled and cannot be served over the network by Metro. ## Changelog [Android] [Added] - Adds support for importing XML assets as images Differential Revision: D62302929
Abbondanzo
force-pushed
the
export-D62302929
branch
from
September 6, 2024 18:30
fe86a5f
to
b0f5f4b
Compare
Abbondanzo
added a commit
to Abbondanzo/react-native
that referenced
this pull request
Sep 9, 2024
Summary: X-link: facebook/metro#1348 Pull Request resolved: facebook#46371 ## Internal Vector drawable image support was added in D59530172 but importing vector drawable asset types was not supported out of the box. It required custom source transformers like the one added in D60021474. This is because Android cannot load vector drawable XML over the network. Vector drawables are compiled by AAPT as part of the build process. Even though Metro can serve XML, it would never load. ## Summary This adds some minor checks in the `AssetSourceResolver` to only attempt loading XML asset types from disk on the Android platform. XML assets like vector drawables are precompiled and cannot be served over the network by Metro. ## Changelog [Android] [Added] - Adds support for importing XML assets as images Reviewed By: javache Differential Revision: D62302929
Summary: Pull Request resolved: facebook#1348 X-link: facebook/react-native#46371 ## Internal Vector drawable image support was added in D59530172 but importing vector drawable asset types was not supported out of the box. It required custom source transformers like the one added in D60021474. This is because Android cannot load vector drawable XML over the network. Vector drawables are compiled by AAPT as part of the build process. Even though Metro can serve XML, it would never load. ## Summary This adds some minor checks in the `AssetSourceResolver` to only attempt loading XML asset types from disk on the Android platform. XML assets like vector drawables are precompiled and cannot be served over the network by Metro. ## Changelog [Android] [Added] - Adds support for importing XML assets as images Reviewed By: javache Differential Revision: D62302929
This pull request was exported from Phabricator. Differential Revision: D62302929 |
Abbondanzo
force-pushed
the
export-D62302929
branch
from
September 9, 2024 14:32
b0f5f4b
to
4e871f0
Compare
This pull request has been merged in c3fbacb. |
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Sep 9, 2024
Summary: X-link: facebook/metro#1348 Pull Request resolved: #46371 ## Internal Vector drawable image support was added in D59530172 but importing vector drawable asset types was not supported out of the box. It required custom source transformers like the one added in D60021474. This is because Android cannot load vector drawable XML over the network. Vector drawables are compiled by AAPT as part of the build process. Even though Metro can serve XML, it would never load. ## Summary This adds some minor checks in the `AssetSourceResolver` to only attempt loading XML asset types from disk on the Android platform. XML assets like vector drawables are precompiled and cannot be served over the network by Metro. ## Changelog [Android] [Added] - Adds support for importing XML assets as images Reviewed By: javache Differential Revision: D62302929 fbshipit-source-id: 01e49ac5b0429d291318984128dfca2dc058149d
robhogan
pushed a commit
that referenced
this pull request
Sep 16, 2024
Summary: Pull Request resolved: #1348 X-link: facebook/react-native#46371 ## Internal Vector drawable image support was added in D59530172 but importing vector drawable asset types was not supported out of the box. It required custom source transformers like the one added in D60021474. This is because Android cannot load vector drawable XML over the network. Vector drawables are compiled by AAPT as part of the build process. Even though Metro can serve XML, it would never load. ## Summary This adds some minor checks in the `AssetSourceResolver` to only attempt loading XML asset types from disk on the Android platform. XML assets like vector drawables are precompiled and cannot be served over the network by Metro. ## Changelog [Android] [Added] - Adds support for importing XML assets as images Reviewed By: javache Differential Revision: D62302929 fbshipit-source-id: 01e49ac5b0429d291318984128dfca2dc058149d
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
Merged
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.
Summary
In preparation for supporting XML files (Android vector drawables) as asset types, this change adds the extension to the list of default asset type extensions
Changelog
[Added] - Adds XML files to the list of default assets
Differential Revision: D62302929