Skip to content

Conversation

acoates-ms
Copy link
Contributor

@acoates-ms acoates-ms commented Jul 5, 2023

Summary:

Currently the CLI provides logic to saveAssets for iOS/Android. -- with some combination of the two implementations working for the basic cases for other platforms. But as other platforms mature, they want to be able to provide more platform specific optimizations similar to how iOS provides logic to generate asset catalogs.

This change introduces a new property to react-native config for platform out of tree implementations to optionally provide. This property provides a location for a js module that can be used to call into a platform specific implementation of much of the saveAssets logic.

For example, macos would be able to duplicate the iOS asset catalog behavior. And windows could modify the asset filenames to align with its native scaling logic.

Test Plan:

microsoft/react-native-windows#11839 adds support for the new saveAssetsPlugin property to successfully relocate assets.

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@szymonrybczak
Copy link
Collaborator

Hey @acoates-ms, since we migrated cli-plugin-metro package to React Native core, mind reopening this PR there? 🙏

@szymonrybczak
Copy link
Collaborator

Closing, see the comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants