Webpack 5 中的 devServer public 选项

devServer public option in Webpack 5

在Webpack 4中,我以前是这样设置dev server的外网URL的:

module.exports = {
  //...
  devServer: {
    public: 'myapp.test:80'
  }
};

但是在 Webpack 5 文档中,我找不到这个选项。我该如何配置?

我相信这已被删除以支持 client.webSocketURL

module.exports = {
  devServer: {
    client: {
      webSocketURL: 'auto://myapp.test:80/ws'
    }
  }
}

来自 Vue CLI 文档:

public, sockHost, sockPath, and sockPort options were removed in favor [of] client.webSocketURL option.

https://cli.vuejs.org/migrations/migrate-from-v4.html#vue-cli-service