aboutsummaryrefslogtreecommitdiff
path: root/node_modules/webpack/bin/webpack.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-12-10 21:51:33 +0100
commit0469abd4a9c9270a1fdc962969e36e63699af8b4 (patch)
treef9864d4a4148621378958794cbbfdc2393733283 /node_modules/webpack/bin/webpack.js
parent6947e79bbc258f7bc96af424ddb71a511f0c15a3 (diff)
upgrade dependencies
Diffstat (limited to 'node_modules/webpack/bin/webpack.js')
-rwxr-xr-xnode_modules/webpack/bin/webpack.js23
1 files changed, 16 insertions, 7 deletions
diff --git a/node_modules/webpack/bin/webpack.js b/node_modules/webpack/bin/webpack.js
index d61288841..469900c73 100755
--- a/node_modules/webpack/bin/webpack.js
+++ b/node_modules/webpack/bin/webpack.js
@@ -211,6 +211,12 @@ yargs.parse(process.argv.slice(2), (err, argv, output) => {
if(typeof outputOptions.context === "undefined")
outputOptions.context = firstOptions.context;
+ ifArg("env", function(value) {
+ if(outputOptions.env) {
+ outputOptions._env = value;
+ }
+ });
+
ifArg("json", function(bool) {
if(bool)
outputOptions.json = bool;
@@ -327,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) {