fix(web): fix dev-server deprecation warning (#10203)
This PR will resolve deprecation warning: (node:62713) [DEP_WEBPACK_DEV_SERVER_HTTPS] DeprecationWarning: 'https' option is deprecated. Please use the 'server' option.
This commit is contained in:
parent
85b185752c
commit
daddcde73c
@ -93,7 +93,6 @@ function getDevServerPartial(
|
||||
open: options.open,
|
||||
static: false,
|
||||
compress: scriptsOptimization || stylesOptimization,
|
||||
https: options.ssl,
|
||||
devMiddleware: {
|
||||
publicPath: servePath,
|
||||
stats: false,
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user