Skip to content

Commit

Permalink
add ios warning as well
Browse files Browse the repository at this point in the history
  • Loading branch information
thymikee committed Jan 16, 2024
1 parent d01e0ee commit 325006d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli-platform-android/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function projectConfig(
// @todo remove for RN 0.75
if (userConfig.unstable_reactLegacyComponentNames) {
logger.warn(
'The "unstable_reactLegacyComponentNames" config option is not necessary anymore for React Native 0.74 and does nothing. Please remove it from the "react-native.config.js" file.',
'The "project.android.unstable_reactLegacyComponentNames" config option is not necessary anymore for React Native 0.74 and does nothing. Please remove it from the "react-native.config.js" file.',
);
}

Expand Down
9 changes: 8 additions & 1 deletion packages/cli-platform-ios/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
IOSProjectConfig,
IOSDependencyConfig,
} from '@react-native-community/cli-types';
import {CLIError} from '@react-native-community/cli-tools';
import {CLIError, logger} from '@react-native-community/cli-tools';

/**
* Returns project config by analyzing given folder and applying some user defaults
Expand Down Expand Up @@ -47,6 +47,13 @@ export function projectConfig(

const xcodeProject = findXcodeProject(fs.readdirSync(sourceDir));

// @ts-ignore @todo remove for RN 0.75
if (userConfig.unstable_reactLegacyComponentNames) {
logger.warn(
'The "project.ios.unstable_reactLegacyComponentNames" config option is not necessary anymore for React Native 0.74 and does nothing. Please remove it from the "react-native.config.js" file.',
);
}

return {
sourceDir,
watchModeCommandParams: userConfig.watchModeCommandParams,
Expand Down

0 comments on commit 325006d

Please sign in to comment.