From f49b68737faf28244c222046cc153827b9a8dc71 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Wed, 4 Sep 2024 15:21:52 +0200 Subject: [PATCH] Fix compat with configuring the devserver server as a string webpack-dev-server supports providing a string when only the type needs to be configured. Our code checking the type to detect the usage of `https` was not properly handling such configuration. --- lib/config-generator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/config-generator.js b/lib/config-generator.js index c202cfc2..b9f91479 100644 --- a/lib/config-generator.js +++ b/lib/config-generator.js @@ -68,7 +68,8 @@ class ConfigGenerator { if (this.webpackConfig.useDevServer() && ( devServerConfig.https - || (devServerConfig.server && devServerConfig.server.type === 'https') + || devServerConfig.server === 'https' + || (typeof devServerConfig.server === 'object' && devServerConfig.server.type === 'https') || this.webpackConfig.runtimeConfig.devServerHttps )) { this.webpackConfig.runtimeConfig.devServerFinalIsHttps = true;