You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"0.60 is pretty messy with all this haste stuff, where it is in an in-between phase where haste is half removed. -- This will get better with 0.61"
"The haste map is a tech that facebook uses internally to reference modules across projects -- they just name all their files differently, then they can require any file from anywhere without having to worry about where it is. Haste was used by react-native to support platforms to be able to override specific modules. View.windows would be picked up by haste from react-native-windows by any require('View') within react-native. The community hates haste, it isn't compatible with normal tooling and created initial boot perf issues on the bundler and a bunch of other issues. So haste is being removed from react-native. As of 0.60, the requires within react-native are mostly not using haste. So we can't rely on haste to work. As of 0.61 it will be gone entirely. But for 0.60 we need to have both relative path imports work and haste imports work. For relative paths to work, we have to copy all of react-native into react-native-windows. So that require(../View/View) will pickup View.windows, we need view.windows to be in the same location as view.js. So now react-native-windows contains the entire implementation of react-native, not just the windows parts. Then we tell metro to use the location of react-native-windows as the location of react-native. This also means that we need to configure haste to only look in react-native-windows, not react-native-windows and react-native for haste modules. Hence, adding react-native to the blacklist."
RNW has some weird workarounds using haste/metro.
Can the long term solution be prioritized for this?
I think this was supposed to have been fixable in 60, but not sure if RNW needs to be on 61 or not for this.
https://facebook.github.io/react-native/blog/2019/06/12/react-native-open-source-update
"0.60 is pretty messy with all this haste stuff, where it is in an in-between phase where haste is half removed. -- This will get better with 0.61"
"The haste map is a tech that facebook uses internally to reference modules across projects -- they just name all their files differently, then they can require any file from anywhere without having to worry about where it is. Haste was used by react-native to support platforms to be able to override specific modules. View.windows would be picked up by haste from react-native-windows by any require('View') within react-native. The community hates haste, it isn't compatible with normal tooling and created initial boot perf issues on the bundler and a bunch of other issues. So haste is being removed from react-native. As of 0.60, the requires within react-native are mostly not using haste. So we can't rely on haste to work. As of 0.61 it will be gone entirely. But for 0.60 we need to have both relative path imports work and haste imports work. For relative paths to work, we have to copy all of react-native into react-native-windows. So that require(../View/View) will pickup View.windows, we need view.windows to be in the same location as view.js. So now react-native-windows contains the entire implementation of react-native, not just the windows parts. Then we tell metro to use the location of react-native-windows as the location of react-native. This also means that we need to configure haste to only look in react-native-windows, not react-native-windows and react-native for haste modules. Hence, adding react-native to the blacklist."
see also:
facebook/react-native#24316
The text was updated successfully, but these errors were encountered: