Skip to content
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

Refactor saveAssets code to allow out of tree overrides #2591

Merged
merged 7 commits into from
Aug 9, 2023

Conversation

acoates-ms
Copy link
Contributor

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
packages/metro-service/src/bundle.ts Outdated Show resolved Hide resolved
packages/metro-service/src/bundle.ts Outdated Show resolved Hide resolved
packages/metro-service/src/asset/write.ts Outdated Show resolved Hide resolved
packages/metro-service/src/asset/write.ts Outdated Show resolved Hide resolved
packages/metro-service/src/asset/default.ts Outdated Show resolved Hide resolved
packages/metro-service/src/asset/ios.ts Outdated Show resolved Hide resolved
packages/metro-service/src/asset/android.ts Outdated Show resolved Hide resolved
acoates-ms and others added 2 commits August 9, 2023 09:23
Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
packages/metro-service/src/asset/default.ts Outdated Show resolved Hide resolved
@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