mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-16 04:10:20 -06:00
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.
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user