From d091f636ed18a7be3ddaaaeb759e3e7c4569a721 Mon Sep 17 00:00:00 2001 From: Tan Jay Jun Date: Tue, 30 Oct 2018 19:25:31 +0800 Subject: [PATCH 1/2] fix(options): fix color option --- bin/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/options.js b/bin/options.js index d4352933cb..3f32ea8416 100644 --- a/bin/options.js +++ b/bin/options.js @@ -57,7 +57,7 @@ const options = { type: 'boolean', alias: 'colors', default: function supportsColor() { - return require('supports-color'); + return require('supports-color').stdout; }, group: DISPLAY_GROUP, describe: 'Enables/Disables colors on the console' From a1493fbf9c0fc40c35f316cc972f861a5e76de0d Mon Sep 17 00:00:00 2001 From: Tan Jay Jun Date: Tue, 30 Oct 2018 20:34:17 +0800 Subject: [PATCH 2/2] fix(bin/options): correct check for color support (`options.color`) --- bin/options.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/options.js b/bin/options.js index 3f32ea8416..03e4d9fd74 100644 --- a/bin/options.js +++ b/bin/options.js @@ -57,6 +57,8 @@ const options = { type: 'boolean', alias: 'colors', default: function supportsColor() { + // 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,