-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(xml): extract tags map to separate entry point for mobile & web #1916
fix(xml): extract tags map to separate entry point for mobile & web #1916
Conversation
@joshuayoes thanks for the contribution! Do you have knowledge how does it go with the discussion from #1279? Especially security concerns e.g. from #1279 (comment)? |
Thanks for your response. Taking a deeper look at those issues, I think this PR may not be a good solution for maximal security, which it seems the team has decided to prioritize. However, it would be nice if there was a clearer error when trying to import these on the web. Perhaps there could be a web export that just throws an error with a link to the PRs? |
Yeah, it seems like a good solution. Maybe even better if there was a link to the #1279 and a note that if you want to use it, then there could be a link to the PRs. Would you mind opening such a PR? |
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.
LGTM, thank you! 🚀
Summary
What issues does the pull request solve? Please tag them so that they will get automatically closed once the PR is merged
When utilizing with
react-native-web
: SvgXml and SvgUri are not exported in thesrc/ReactNativeSVG.web.ts
extension. The logic for SvgXml and SvgUri do not have native dependencies, so they are safe to consume on web.Issues:
What is the feature? (if applicable)
Add SvgXml and SvgUri as consumable exports for
react-native-web
How did you implement the solution?
Extract
tags
to shapes map into separatetags.tsx
file, where native shape elements and web shape elements can be provided to their respective envs.What areas of the library does it impact?
src
directoryTest Plan
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
What's required for testing (prerequisites)?
n/a
What are the steps to reproduce (after prerequisites)?
n/a
Compatibility
Checklist
README.md
__tests__
folder