devServer

  • Type: object
  • Default: {}

配置开发服务器。

包含以下子配置项,

  • port,端口号,默认 8000
  • host,默认 0.0.0.0
  • https,是否启用 https server
  • http2,是否启用 http2

启用 port 和 host 也可以通过环境变量 PORT 和 HOST 临时指定。