Skip to content

Refactor saveAssets code to allow out of tree overrides#2591

Merged
tido64 merged 7 commits into
mainfrom
saveAssetsPlugin
Aug 9, 2023
Merged

Refactor saveAssets code to allow out of tree overrides#2591
tido64 merged 7 commits into
mainfrom
saveAssetsPlugin

Conversation

@acoates-ms

Copy link
Copy Markdown
Collaborator

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.

@github-actions github-actions Bot added the feature: metro This is related to Metro label Aug 8, 2023
Comment thread packages/metro-service/src/bundle.ts Outdated
Comment thread packages/metro-service/src/bundle.ts Outdated
Comment thread packages/metro-service/src/asset/write.ts Outdated
Comment thread packages/metro-service/src/asset/write.ts Outdated
Comment thread packages/metro-service/src/asset/default.ts Outdated
Comment thread packages/metro-service/src/asset/ios.ts Outdated
Comment thread packages/metro-service/src/asset/android.ts Outdated
acoates-ms and others added 2 commits August 9, 2023 09:23
Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
Comment thread packages/metro-service/src/asset/default.ts Outdated
@tido64 tido64 enabled auto-merge (squash) August 9, 2023 17:05
@tido64 tido64 merged commit 2edf436 into main Aug 9, 2023
@tido64 tido64 deleted the saveAssetsPlugin branch August 9, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: metro This is related to Metro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants