Refactor saveAssets code to allow out of tree overrides #2591
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
This change brings in most of react-native-community/cli#2002 into rnx-kit. Minus the config loading part, since that schema is controlled by the RN cli.
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.
microsoft/react-native-windows#11839 adds support for the new saveAssetsPlugin to successfully relocate assets - and this PR will automatically pick up the new plugin in @office-iss/react-native-win32, without going through rn-config. Once it is added to the config we will be able to remove this special case logic.