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,
|
open: options.open,
|
||||||
static: false,
|
static: false,
|
||||||
compress: scriptsOptimization || stylesOptimization,
|
compress: scriptsOptimization || stylesOptimization,
|
||||||
https: options.ssl,
|
|
||||||
devMiddleware: {
|
devMiddleware: {
|
||||||
publicPath: servePath,
|
publicPath: servePath,
|
||||||
stats: false,
|
stats: false,
|
||||||
@ -109,8 +108,13 @@ function getDevServerPartial(
|
|||||||
hot: options.hmr,
|
hot: options.hmr,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.ssl && options.sslKey && options.sslCert) {
|
if (options.ssl) {
|
||||||
config.https = getSslConfig(root, options);
|
config.server = {
|
||||||
|
type: 'https',
|
||||||
|
};
|
||||||
|
if (options.sslKey && options.sslCert) {
|
||||||
|
config.server.options = getSslConfig(root, options);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.proxyConfig) {
|
if (options.proxyConfig) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user