From 55398b5de17b9a845b1ee5aaa90bb2002c25ddfb Mon Sep 17 00:00:00 2001 From: Tan Jay Jun Date: Tue, 30 Oct 2018 20:38:07 +0800 Subject: [PATCH] fix(bin/options): correct check for color support (`options.color`) (#1555) --- bin/options.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/options.js b/bin/options.js index d4352933cb..03e4d9fd74 100644 --- a/bin/options.js +++ b/bin/options.js @@ -57,7 +57,9 @@ const options = { type: 'boolean', alias: 'colors', default: function supportsColor() { - return require('supports-color'); + // Use `require('supports-color').stdout` for supports-color >= 5.0.0. + // See https://github.com/webpack/webpack-dev-server/pull/1555. + return require('supports-color').stdout; }, group: DISPLAY_GROUP, describe: 'Enables/Disables colors on the console'