mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Hotfix to include react-native-windows in hasteImpl accepted paths (#20007)
Summary: Closes https://github.com/facebook/react-native/pull/20007 We removed support for providesModule annotations and maintained support for Haste names in installed modules via `providesModuleNodeModules`, but our default `hasteImpl` doesn't take them into account. We need to find a better way to override core components from plugins but meanwhile this adds an exception for react-native-windows in the default `hasteImpl` to unblock their upgrade to the latest RC. Fixes https://github.com/facebook/metro/issues/188 Reviewed By: mjesun Differential Revision: D8695207 fbshipit-source-id: 2ad6cb1e93e600880a148776ac45f6ebd7d205d3
This commit is contained in:
committed by
Facebook Github Bot
parent
fdce938455
commit
54942746d4
@@ -72,6 +72,14 @@ const pluginPlatforms = plugins.platforms.reduce((acc, pathToPlatforms) => {
|
||||
const defaultRNConfig = {
|
||||
hasteImplModulePath: require.resolve('../../jest/hasteImpl'),
|
||||
|
||||
getPlatforms(): Array<string> {
|
||||
return ['ios', 'android', 'windows', 'web'];
|
||||
},
|
||||
|
||||
getProvidesModuleNodeModules(): Array<string> {
|
||||
return ['react-native', 'react-native-windows'];
|
||||
},
|
||||
|
||||
getProjectCommands(): Array<CommandT> {
|
||||
const commands = plugins.commands.map(pathToCommands => {
|
||||
const name = pathToCommands.split(path.sep)[0];
|
||||
|
||||
Reference in New Issue
Block a user