mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-06 22:44:22 +08:00
0b6dbdb8273f3dfa47208cde92fc2072f4cdf08e
Summary: cc @amasad An error occurred while trying to display the Red Box since loadSourceMap was not included in the JS bundle. This is because node-haste was treating its docblock as a multiline directive which doesn't make sense for `@providesModule`. In loadSourceMap.js's case, the directive's value was parsed as "loadSourceMap -- disabled flow due to mysterious validation errors --". There are two fixes: add a newline under the `@providesModule` directive, and change the module ID code to look at only the first token of the directive. I opted for the latter so we avoid this class of bugs entirely and AFAIK it's nonsensical to have multiple `@providesModule` values anyway. Closes https://github.com/facebook/react-native/pull/866 Github Author: James Ide <ide@jameside.com> Test Plan: Run the packager, trigger an error in an app, see the red box now show up again.
Description
Languages
JavaScript
40.2%
Java
24.7%
Objective-C
14.3%
C++
13.5%
Objective-C++
3.9%
Other
3.3%