From aaae04ffe31439e4f7b0dfc21c7089608ad60bc9 Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Wed, 24 Jun 2020 12:16:47 -0500 Subject: [PATCH 01/11] fix(cli): remove default values for webpack cli flags --- bin/cli-flags.js | 2 -- lib/utils/normalizeOptions.js | 9 +++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/cli-flags.js b/bin/cli-flags.js index c1dbb4a3b7..2937222c95 100644 --- a/bin/cli-flags.js +++ b/bin/cli-flags.js @@ -17,7 +17,6 @@ module.exports = { { name: 'live-reload', type: Boolean, - defaultValue: true, describe: 'Enables/Disables live reloading on changing files', }, { @@ -62,7 +61,6 @@ module.exports = { name: 'client-logging', type: String, group: DISPLAY_GROUP, - defaultValue: 'info', describe: 'Log level in the browser (none, error, warn, info, log, verbose)', }, diff --git a/lib/utils/normalizeOptions.js b/lib/utils/normalizeOptions.js index d0f28d4d86..02b497f337 100644 --- a/lib/utils/normalizeOptions.js +++ b/lib/utils/normalizeOptions.js @@ -102,6 +102,15 @@ function normalizeOptions(compiler, options) { }`; options.dev = options.dev || {}; + options.client.logging = options.client.logging || 'info'; + + if (typeof options.liveReload === 'undefined') { + options.liveReload = true; + } + + if (typeof options.serveIndex === 'undefined') { + options.serveIndex = true; + } } module.exports = normalizeOptions; From f0cf5cc100f688df70d5a098f1650f8f969b2ca3 Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Wed, 24 Jun 2020 13:13:59 -0500 Subject: [PATCH 02/11] fix(cli): open page can be an array of strings --- bin/cli-flags.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/cli-flags.js b/bin/cli-flags.js index 2937222c95..43277e9a21 100644 --- a/bin/cli-flags.js +++ b/bin/cli-flags.js @@ -56,6 +56,7 @@ module.exports = { name: 'open-page', type: String, describe: 'Open default browser with the specified page', + multiple: true, }, { name: 'client-logging', From 7d17e457519f638556ce6e3e045879181adec2f6 Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Thu, 25 Jun 2020 11:51:12 -0500 Subject: [PATCH 03/11] chore(client): change default logging setting and add comment --- client-src/default/utils/log.js | 2 ++ lib/utils/normalizeOptions.js | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client-src/default/utils/log.js b/client-src/default/utils/log.js index 41d5ca2572..4063d8393a 100644 --- a/client-src/default/utils/log.js +++ b/client-src/default/utils/log.js @@ -3,6 +3,8 @@ const log = require('webpack/lib/logging/runtime'); const name = 'webpack-dev-server'; +// default level is set on the client side, so it does not need +// to be set by the CLI or API const defaultLevel = 'info'; function setLogLevel(level) { diff --git a/lib/utils/normalizeOptions.js b/lib/utils/normalizeOptions.js index 02b497f337..6c52252213 100644 --- a/lib/utils/normalizeOptions.js +++ b/lib/utils/normalizeOptions.js @@ -102,7 +102,6 @@ function normalizeOptions(compiler, options) { }`; options.dev = options.dev || {}; - options.client.logging = options.client.logging || 'info'; if (typeof options.liveReload === 'undefined') { options.liveReload = true; From af38f7fba8d46bb37050a3ea6cf24e6904ec45c3 Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Thu, 25 Jun 2020 12:04:12 -0500 Subject: [PATCH 04/11] chore(options): remove duplicate default setting --- lib/utils/normalizeOptions.js | 8 -------- test/server/utils/normalizeOptions.test.js | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/utils/normalizeOptions.js b/lib/utils/normalizeOptions.js index 6c52252213..d0f28d4d86 100644 --- a/lib/utils/normalizeOptions.js +++ b/lib/utils/normalizeOptions.js @@ -102,14 +102,6 @@ function normalizeOptions(compiler, options) { }`; options.dev = options.dev || {}; - - if (typeof options.liveReload === 'undefined') { - options.liveReload = true; - } - - if (typeof options.serveIndex === 'undefined') { - options.serveIndex = true; - } } module.exports = normalizeOptions; diff --git a/test/server/utils/normalizeOptions.test.js b/test/server/utils/normalizeOptions.test.js index fb0475736b..879a4dd673 100644 --- a/test/server/utils/normalizeOptions.test.js +++ b/test/server/utils/normalizeOptions.test.js @@ -448,6 +448,7 @@ describe('normalizeOptions', () => { }); } + console.log(data.options); expect(data.options).toMatchSnapshot(); } }); From 1be0c2f6b861477b3ab95b6b71ccc596dc162d0d Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Thu, 25 Jun 2020 12:07:18 -0500 Subject: [PATCH 05/11] test(options): add serve index tests --- .../normalizeOptions.test.js.snap | 36 +++++++++++++++++++ test/server/utils/normalizeOptions.test.js | 16 +++++++++ 2 files changed, 52 insertions(+) diff --git a/test/server/utils/__snapshots__/normalizeOptions.test.js.snap b/test/server/utils/__snapshots__/normalizeOptions.test.js.snap index d91b0da006..673a941a44 100644 --- a/test/server/utils/__snapshots__/normalizeOptions.test.js.snap +++ b/test/server/utils/__snapshots__/normalizeOptions.test.js.snap @@ -874,6 +874,42 @@ Object { } `; +exports[`normalizeOptions serveIndex is false should set correct options 1`] = ` +Object { + "client": Object { + "path": "/ws", + }, + "contentBasePublicPath": "/", + "hot": true, + "liveReload": true, + "serveIndex": false, + "stats": Object {}, + "transportMode": Object { + "client": "ws", + "server": "ws", + }, + "watchOptions": Object {}, +} +`; + +exports[`normalizeOptions serveIndex is true should set correct options 1`] = ` +Object { + "client": Object { + "path": "/ws", + }, + "contentBasePublicPath": "/", + "hot": true, + "liveReload": true, + "serveIndex": true, + "stats": Object {}, + "transportMode": Object { + "client": "ws", + "server": "ws", + }, + "watchOptions": Object {}, +} +`; + exports[`normalizeOptions transportMode custom client path should set correct options 1`] = ` Object { "client": Object { diff --git a/test/server/utils/normalizeOptions.test.js b/test/server/utils/normalizeOptions.test.js index 879a4dd673..d2ca839ba9 100644 --- a/test/server/utils/normalizeOptions.test.js +++ b/test/server/utils/normalizeOptions.test.js @@ -115,6 +115,22 @@ describe('normalizeOptions', () => { }, optionsResults: null, }, + { + title: 'serveIndex is true', + multiCompiler: false, + options: { + serveIndex: true, + }, + optionsResults: null, + }, + { + title: 'serveIndex is false', + multiCompiler: false, + options: { + serveIndex: false, + }, + optionsResults: null, + }, { title: 'hot is true', multiCompiler: false, From 50763e68d1dcdc3644a9b79b4779f54445259f9d Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Thu, 25 Jun 2020 12:08:37 -0500 Subject: [PATCH 06/11] chore(server): remove console log --- test/server/utils/normalizeOptions.test.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/server/utils/normalizeOptions.test.js b/test/server/utils/normalizeOptions.test.js index d2ca839ba9..6eedf12cfe 100644 --- a/test/server/utils/normalizeOptions.test.js +++ b/test/server/utils/normalizeOptions.test.js @@ -464,7 +464,6 @@ describe('normalizeOptions', () => { }); } - console.log(data.options); expect(data.options).toMatchSnapshot(); } }); From 45fb947484c31991a1e5fe602057730484d06dbe Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Mon, 6 Jul 2020 14:59:01 -0500 Subject: [PATCH 07/11] chore(cli): add name flag --- bin/cli-flags.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/cli-flags.js b/bin/cli-flags.js index 43277e9a21..31d8849dc8 100644 --- a/bin/cli-flags.js +++ b/bin/cli-flags.js @@ -131,5 +131,10 @@ module.exports = { group: CONNECTION_GROUP, multiple: true, }, + { + name: 'name', + type: String, + describe: 'Name or index of webpack config to get devServer config from', + }, ], }; From 996c7cfa6e58cc986e0be22b61d2758bf9af702d Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Tue, 7 Jul 2020 11:01:27 -0500 Subject: [PATCH 08/11] chore(cli): change description of name flag --- bin/cli-flags.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cli-flags.js b/bin/cli-flags.js index 31d8849dc8..e0248991c5 100644 --- a/bin/cli-flags.js +++ b/bin/cli-flags.js @@ -134,7 +134,7 @@ module.exports = { { name: 'name', type: String, - describe: 'Name or index of webpack config to get devServer config from', + describe: 'Name of webpack config to get devServer config from', }, ], }; From 987439e8dc29ca56b66263f79651c167e91cd93e Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Thu, 20 Aug 2020 15:41:33 -0500 Subject: [PATCH 09/11] chore(options): remove serveIndex tests in normalizeOptions --- .../normalizeOptions.test.js.snap | 36 ------------------- test/server/utils/normalizeOptions.test.js | 16 --------- 2 files changed, 52 deletions(-) diff --git a/test/server/utils/__snapshots__/normalizeOptions.test.js.snap b/test/server/utils/__snapshots__/normalizeOptions.test.js.snap index 673a941a44..d91b0da006 100644 --- a/test/server/utils/__snapshots__/normalizeOptions.test.js.snap +++ b/test/server/utils/__snapshots__/normalizeOptions.test.js.snap @@ -874,42 +874,6 @@ Object { } `; -exports[`normalizeOptions serveIndex is false should set correct options 1`] = ` -Object { - "client": Object { - "path": "/ws", - }, - "contentBasePublicPath": "/", - "hot": true, - "liveReload": true, - "serveIndex": false, - "stats": Object {}, - "transportMode": Object { - "client": "ws", - "server": "ws", - }, - "watchOptions": Object {}, -} -`; - -exports[`normalizeOptions serveIndex is true should set correct options 1`] = ` -Object { - "client": Object { - "path": "/ws", - }, - "contentBasePublicPath": "/", - "hot": true, - "liveReload": true, - "serveIndex": true, - "stats": Object {}, - "transportMode": Object { - "client": "ws", - "server": "ws", - }, - "watchOptions": Object {}, -} -`; - exports[`normalizeOptions transportMode custom client path should set correct options 1`] = ` Object { "client": Object { diff --git a/test/server/utils/normalizeOptions.test.js b/test/server/utils/normalizeOptions.test.js index 6eedf12cfe..fb0475736b 100644 --- a/test/server/utils/normalizeOptions.test.js +++ b/test/server/utils/normalizeOptions.test.js @@ -115,22 +115,6 @@ describe('normalizeOptions', () => { }, optionsResults: null, }, - { - title: 'serveIndex is true', - multiCompiler: false, - options: { - serveIndex: true, - }, - optionsResults: null, - }, - { - title: 'serveIndex is false', - multiCompiler: false, - options: { - serveIndex: false, - }, - optionsResults: null, - }, { title: 'hot is true', multiCompiler: false, From 11832a08233371d83c004a3fc2e0f8069fa6ecad Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Thu, 20 Aug 2020 16:31:35 -0500 Subject: [PATCH 10/11] chore(cli): remove default values for actual cli flags --- bin/options.js | 2 - lib/utils/createConfig.js | 8 ++- .../__snapshots__/createConfig.test.js.snap | 64 +++++++++++++++++++ 3 files changed, 71 insertions(+), 3 deletions(-) diff --git a/bin/options.js b/bin/options.js index 198f708c41..bcb3d0a554 100644 --- a/bin/options.js +++ b/bin/options.js @@ -15,7 +15,6 @@ const options = { 'live-reload': { type: 'boolean', describe: 'Enables/Disables live reloading on changing files', - default: true, }, profile: { type: 'boolean', @@ -56,7 +55,6 @@ const options = { 'client-logging': { type: 'string', group: DISPLAY_GROUP, - default: 'info', describe: 'Log level in the browser (none, error, warn, info, log, verbose)', }, diff --git a/lib/utils/createConfig.js b/lib/utils/createConfig.js index 38a6e8f085..43c5b9660d 100644 --- a/lib/utils/createConfig.js +++ b/lib/utils/createConfig.js @@ -14,10 +14,16 @@ function createConfig(config, argv, { port }) { options.bonjour = true; } - if (argv.host && (argv.host !== 'localhost' || !options.host)) { + // CLI args host takes precedence over devServer host + if (argv.host) { options.host = argv.host; } + // host defaults to localhost for CLI if none is provided + if (!options.host) { + options.host = 'localhost'; + } + if (argv.allowedHosts) { options.allowedHosts = argv.allowedHosts.split(','); } diff --git a/test/server/utils/__snapshots__/createConfig.test.js.snap b/test/server/utils/__snapshots__/createConfig.test.js.snap index 780671ee5f..35eb2042d8 100644 --- a/test/server/utils/__snapshots__/createConfig.test.js.snap +++ b/test/server/utils/__snapshots__/createConfig.test.js.snap @@ -7,6 +7,7 @@ Object { "host2.com", ], "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -19,6 +20,7 @@ Object { "host2.com", ], "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -28,6 +30,7 @@ exports[`createConfig bonjour option (devServer config) 1`] = ` Object { "bonjour": true, "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -37,6 +40,7 @@ exports[`createConfig bonjour option 1`] = ` Object { "bonjour": true, "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -48,6 +52,7 @@ Object { "logging": "none", }, "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -59,6 +64,7 @@ Object { "logging": "none", }, "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -70,6 +76,7 @@ Object { "logging": "none", }, "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -79,6 +86,7 @@ exports[`createConfig compress option (in devServer config) 1`] = ` Object { "compress": true, "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -88,6 +96,7 @@ exports[`createConfig compress option 1`] = ` Object { "compress": true, "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -97,6 +106,7 @@ exports[`createConfig disableHostCheck option (in devServer config) 1`] = ` Object { "dev": Object {}, "disableHostCheck": true, + "host": "localhost", "hot": true, "port": 8080, } @@ -106,6 +116,7 @@ exports[`createConfig disableHostCheck option 1`] = ` Object { "dev": Object {}, "disableHostCheck": true, + "host": "localhost", "hot": true, "port": 8080, } @@ -115,6 +126,7 @@ exports[`createConfig historyApiFallback option (in devServer config) 1`] = ` Object { "dev": Object {}, "historyApiFallback": true, + "host": "localhost", "hot": true, "port": 8080, } @@ -124,6 +136,7 @@ exports[`createConfig historyApiFallback option 1`] = ` Object { "dev": Object {}, "historyApiFallback": true, + "host": "localhost", "hot": true, "port": 8080, } @@ -150,6 +163,7 @@ Object { exports[`createConfig host option (null) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -167,6 +181,7 @@ Object { exports[`createConfig host option (undefined) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -184,6 +199,7 @@ Object { exports[`createConfig hot only option (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": "only", "port": 8080, } @@ -192,6 +208,7 @@ Object { exports[`createConfig hot only option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": "only", "port": 8080, } @@ -200,6 +217,7 @@ Object { exports[`createConfig hot option (false) (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": false, "port": 8080, } @@ -208,6 +226,7 @@ Object { exports[`createConfig hot option (false) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": false, "port": 8080, } @@ -216,6 +235,7 @@ Object { exports[`createConfig hot option (true) (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -224,6 +244,7 @@ Object { exports[`createConfig hot option (true) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -232,6 +253,7 @@ Object { exports[`createConfig http2 option (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "http2": true, "https": true, @@ -242,6 +264,7 @@ Object { exports[`createConfig http2 option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "http2": true, "https": true, @@ -252,6 +275,7 @@ Object { exports[`createConfig https option (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "https": true, "port": 8080, @@ -261,6 +285,7 @@ Object { exports[`createConfig https option (in devServer config) 2`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "https": Object { "ca": Object { @@ -275,6 +300,7 @@ Object { exports[`createConfig https option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "https": true, "port": 8080, @@ -284,6 +310,7 @@ Object { exports[`createConfig https option 2`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "https": true, "port": 8080, @@ -293,6 +320,7 @@ Object { exports[`createConfig info option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -301,6 +329,7 @@ Object { exports[`createConfig liveReload option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "liveReload": false, "port": 8080, @@ -310,6 +339,7 @@ Object { exports[`createConfig mimeTypes option - with force 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "mimeTypes": Object { "force": true, @@ -326,6 +356,7 @@ Object { exports[`createConfig mimeTypes option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "mimeTypes": Object { "text/html": Array [ @@ -339,6 +370,7 @@ Object { exports[`createConfig onListening option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "onListening": [Function], "port": 8080, @@ -348,6 +380,7 @@ Object { exports[`createConfig open option (boolean) (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "open": true, "openPage": "", @@ -358,6 +391,7 @@ Object { exports[`createConfig open option (boolean) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "open": true, "openPage": "", @@ -368,6 +402,7 @@ Object { exports[`createConfig open option (object) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "open": Object { "app": Array [ @@ -383,6 +418,7 @@ Object { exports[`createConfig open option (string) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "open": "Google Chrome", "openPage": "", @@ -393,6 +429,7 @@ Object { exports[`createConfig openPage multiple option (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "open": true, "openPage": Array [ @@ -406,6 +443,7 @@ Object { exports[`createConfig openPage option (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "open": true, "openPage": "/different/page", @@ -416,6 +454,7 @@ Object { exports[`createConfig openPage option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "open": true, "openPage": Array [ @@ -428,6 +467,7 @@ Object { exports[`createConfig overlay option (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "overlay": true, "port": 8080, @@ -437,6 +477,7 @@ Object { exports[`createConfig overlay option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "overlay": true, "port": 8080, @@ -446,6 +487,7 @@ Object { exports[`createConfig port option (difference) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 7070, } @@ -454,6 +496,7 @@ Object { exports[`createConfig port option (same) (null) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": null, } @@ -462,6 +505,7 @@ Object { exports[`createConfig port option (same) (string) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": "9090", } @@ -470,6 +514,7 @@ Object { exports[`createConfig port option (same) (undefined) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": undefined, } @@ -478,6 +523,7 @@ Object { exports[`createConfig port option (same) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 9090, } @@ -486,6 +532,7 @@ Object { exports[`createConfig profile option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "profile": "profile", @@ -495,6 +542,7 @@ Object { exports[`createConfig progress option (devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "progress": true, @@ -504,6 +552,7 @@ Object { exports[`createConfig progress option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "progress": true, @@ -513,6 +562,7 @@ Object { exports[`createConfig public option (devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "public": true, @@ -522,6 +572,7 @@ Object { exports[`createConfig public option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "public": true, @@ -531,6 +582,7 @@ Object { exports[`createConfig publicPath option (not specify) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -541,6 +593,7 @@ Object { "dev": Object { "publicPath": "/assets/", }, + "host": "localhost", "hot": true, "port": 8080, } @@ -549,6 +602,7 @@ Object { exports[`createConfig publicPath option (path in output option) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -557,6 +611,7 @@ Object { exports[`createConfig publicPath option (path without starting slash in output option) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -567,6 +622,7 @@ Object { "dev": Object { "publicPath": "http://localhost:8080/assets/", }, + "host": "localhost", "hot": true, "port": 8080, } @@ -575,6 +631,7 @@ Object { exports[`createConfig publicPath option (url in output option) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -583,6 +640,7 @@ Object { exports[`createConfig simple 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, } @@ -591,6 +649,7 @@ Object { exports[`createConfig static option (boolean) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "static": false, @@ -600,6 +659,7 @@ Object { exports[`createConfig static option (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "static": true, @@ -609,6 +669,7 @@ Object { exports[`createConfig static option (list of strings) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "static": Array [ @@ -621,6 +682,7 @@ Object { exports[`createConfig static option (string) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "static": Array [ @@ -632,6 +694,7 @@ Object { exports[`createConfig useLocalIp option (in devServer config) 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "useLocalIp": true, @@ -641,6 +704,7 @@ Object { exports[`createConfig useLocalIp option 1`] = ` Object { "dev": Object {}, + "host": "localhost", "hot": true, "port": 8080, "useLocalIp": true, From accce0f3f726b70cf3de45e022a2d022340b6519 Mon Sep 17 00:00:00 2001 From: Kirill Nagaitsev Date: Fri, 21 Aug 2020 11:34:02 -0500 Subject: [PATCH 11/11] chore(cli): remove name cli flag --- bin/cli-flags.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bin/cli-flags.js b/bin/cli-flags.js index e0248991c5..43277e9a21 100644 --- a/bin/cli-flags.js +++ b/bin/cli-flags.js @@ -131,10 +131,5 @@ module.exports = { group: CONNECTION_GROUP, multiple: true, }, - { - name: 'name', - type: String, - describe: 'Name of webpack config to get devServer config from', - }, ], };