Skip to content

Commit 558dea2

Browse files
committed
fix: support devServer.server option, avoid deprecation warning
Closes #7024 Fixes #7118 I choose to not merge the PR because I don't want add additional ways to configure https for dev server (`--http2` command line argument, `process.env.HTTPS`, etc.) In the current implementation, `spdy` can only be configured by setting `{ devServer: server: { type: 'spdy' } }`. This is a deliberate choice, because SPDY support in Node.js 15+ is broken anyway. I don't want bother refactoring the old code to accommodate this broken feature.
1 parent bddd64d commit 558dea2

File tree

1 file changed

+8
-1
lines changed
  • packages/@vue/cli-service/lib/commands

1 file changed

+8
-1
lines changed

packages/@vue/cli-service/lib/commands/serve.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,14 @@ module.exports = (api, options) => {
199199
}, projectDevServerOptions, {
200200
host,
201201
port,
202-
https: useHttps,
202+
203+
server: {
204+
type: protocol,
205+
...(typeof projectDevServerOptions.server === 'object'
206+
? projectDevServerOptions.server
207+
: {})
208+
},
209+
203210
proxy: proxySettings,
204211

205212
static: {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy