Skip to content

Commit

Permalink
Handle compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hodgef committed Aug 17, 2019
1 parent b015a70 commit ce37d1c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/build.js
Expand Up @@ -106,8 +106,8 @@ checkBrowsers(paths.appPath, isInteractive)
);
},
err => {
console.error('Failed to compile');
printBuildError(err);
throw new Error('Failed to compile');
process.exit(1);
}
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/demo.js
Expand Up @@ -106,8 +106,8 @@ checkBrowsers(paths.appPath, isInteractive)
);
},
err => {
console.error('Failed to compile');
printBuildError(err);
throw new Error('Failed to compile');
process.exit(1);
}
)
Expand Down
4 changes: 3 additions & 1 deletion scripts/start.js
Expand Up @@ -139,7 +139,9 @@ checkBrowsers(paths.appPath, isInteractive)
stats = stats.toJson();

if (stats.errors && stats.errors.length > 0) {
return;
devServer.close();
process.exit(1);
return;
}

console.warn("App started in test mode. Closing in 5 seconds.");
Expand Down

0 comments on commit ce37d1c

Please sign in to comment.