From 542604a44c03cc053557709897b02d42a38d5360 Mon Sep 17 00:00:00 2001 From: Marcin K Date: Wed, 2 Aug 2017 08:24:05 +0100 Subject: [PATCH 1/2] Descriptive error message for invalid format type. I just spent 30 minutes because I misspelled a clj (cljs). This error message would make easier to figure out what option is wrong and what is current vs expected value. --- src/Bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle.js b/src/Bundle.js index 884eae76eac..794b7b8efdc 100644 --- a/src/Bundle.js +++ b/src/Bundle.js @@ -506,7 +506,7 @@ export default class Bundle { if ( !finalise ) { error({ code: 'INVALID_OPTION', - message: `You must specify an output type - valid options are ${keys( finalisers ).join( ', ' )}` + message: `Unknown or missing format: ${options.format} - valid options are ${keys( finalisers ).join( ', ' )}` }); } From 7df44de2f761d884e7514f0d2a59672b36d2c2a7 Mon Sep 17 00:00:00 2001 From: Marcin K Date: Wed, 2 Aug 2017 08:29:42 +0100 Subject: [PATCH 2/2] Update Bundle.js --- src/Bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle.js b/src/Bundle.js index 794b7b8efdc..2f7c024af6e 100644 --- a/src/Bundle.js +++ b/src/Bundle.js @@ -506,7 +506,7 @@ export default class Bundle { if ( !finalise ) { error({ code: 'INVALID_OPTION', - message: `Unknown or missing format: ${options.format} - valid options are ${keys( finalisers ).join( ', ' )}` + message: `Invalid or missing format: ${options.format} - valid options are ${keys( finalisers ).join( ', ' )}` }); }