Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -333,16 +333,19 @@ yargs.parse(process.argv.slice(2), (err, argv, output) => {
var compiler;
try {
compiler = webpack(options);
} catch(e) {
var WebpackOptionsValidationError = require("../lib/WebpackOptionsValidationError");
if(e instanceof WebpackOptionsValidationError) {
} catch(err) {
if(err.name === "WebpackOptionsValidationError") {
if(argv.color)
console.error("\u001b[1m\u001b[31m" + e.message + "\u001b[39m\u001b[22m");
console.error(
`\u001b[1m\u001b[31m${err.message}\u001b[39m\u001b[22m`
);
else
console.error(e.message);
process.exit(1); // eslint-disable-line no-process-exit
console.error(err.message);
// eslint-disable-next-line no-process-exit
process.exit(1);
}
throw e;
throw err;
}
if(argv.progress) {
@@ -361,7 +364,8 @@ yargs.parse(process.argv.slice(2), (err, argv, output) => {
lastHash = null;
console.error(err.stack || err);
if(err.details) console.error(err.details);
process.exit(1); // eslint-disable-line
process.exitCode = 1;
return;
}
if(outputOptions.json) {
process.stdout.write(JSON.stringify(stats.toJson(outputOptions), null, 2) + "\n");