Skip to content

Commit

Permalink
fix: support devServer.server option, avoid deprecation warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sodatea committed Jul 4, 2022
1 parent bddd64d commit 558dea2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/@vue/cli-service/lib/commands/serve.js
Expand Up @@ -199,7 +199,14 @@ module.exports = (api, options) => {
}, projectDevServerOptions, {
host,
port,
https: useHttps,

server: {
type: protocol,
...(typeof projectDevServerOptions.server === 'object'
? projectDevServerOptions.server
: {})
},

proxy: proxySettings,

static: {
Expand Down

0 comments on commit 558dea2

Please sign in to comment.