Skip to content

Commit

Permalink
Fix compat with configuring the devserver server as a string
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stof committed Sep 4, 2024
1 parent 9d0fb3b commit f49b687
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/config-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f49b687

Please sign in to comment.