Skip to content

Commit 8e38779

Browse files
Fix warning shown when running npm run serve
(node:2671539) [DEP_WEBPACK_DEV_SERVER_HTTPS] DeprecationWarning: 'https' option is deprecated. Please use the 'server' option. (Use `node --trace-deprecation ...` to show where the warning was created) Added a new environment flag called DEV_HTTPS. Set it to true to run the app with HTTPS (useful for testing secure-only features or using a signed certificate) Ref: https://webpack.js.org/configuration/dev-server/#devserverserver Change-Id: I31d27b04488923be58514499234286fa89b4d03b Signed-off-by: Hariharan Rangasamy <hariharanr@ami.com>
1 parent c5d60f5 commit 8e38779

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vue.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ module.exports = {
2727
},
2828
},
2929
devServer: {
30-
https: true,
30+
// Set DEV_HTTPS=true to run with HTTPS (helpful for testing secure-only features or with a signed cert)
31+
// ref https://webpack.js.org/configuration/dev-server/#devserverserver
32+
server:
33+
process.env.DEV_HTTPS === 'true' ? { type: 'https' } : { type: 'http' },
3134
proxy: {
3235
'/': {
3336
target: process.env.BASE_URL,

0 commit comments

Comments
 (0)