mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 12:15:37 +08:00
[ReactNative] Do flow check when running packager
This commit is contained in:
6
packager/react-packager/src/Server/index.js
vendored
6
packager/react-packager/src/Server/index.js
vendored
@@ -320,6 +320,12 @@ function handleError(res, error) {
|
||||
});
|
||||
|
||||
if (error.type === 'TransformError' || error.type === 'NotFoundError') {
|
||||
error.errors = [{
|
||||
description: error.description,
|
||||
filename: error.filename,
|
||||
lineNumber: error.lineNumber,
|
||||
}];
|
||||
console.error(error);
|
||||
res.end(JSON.stringify(error));
|
||||
} else {
|
||||
console.error(error.stack || error);
|
||||
|
||||
Reference in New Issue
Block a user