Skip to content

Commit 558dea2

Browse files
committedJul 4, 2022
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

+8-1
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)