Skip to content

Commit

Permalink
fix(web): fix dev-server deprecation warning (#10203)
Browse files Browse the repository at this point in the history
This  PR will resolve deprecation warning:
(node:62713) [DEP_WEBPACK_DEV_SERVER_HTTPS] DeprecationWarning: 'https' option is deprecated. Please use the 'server' option.
  • Loading branch information
radulle committed May 30, 2022
1 parent 85b1857 commit daddcde
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/web/src/utils/devserver.config.ts
Expand Up @@ -93,7 +93,6 @@ function getDevServerPartial(
open: options.open,
static: false,
compress: scriptsOptimization || stylesOptimization,
https: options.ssl,
devMiddleware: {
publicPath: servePath,
stats: false,
Expand All @@ -109,8 +108,13 @@ function getDevServerPartial(
hot: options.hmr,
};

if (options.ssl && options.sslKey && options.sslCert) {
config.https = getSslConfig(root, options);
if (options.ssl) {
config.server = {
type: 'https',
};
if (options.sslKey && options.sslCert) {
config.server.options = getSslConfig(root, options);
}
}

if (options.proxyConfig) {
Expand Down

0 comments on commit daddcde

Please sign in to comment.