By default, webpack's development websocket rejects all incoming connections having an unexpected `Host` or `Origin` header:
https://webpack.js.org/configuration/dev-server/#devserverallowedhosts
This configuration sets `devServer.allowedHosts` to `[".preview.app.github.dev"]` if a GitHub Codespaces environment is detected.
Additionally, to handle how GitHub Codespaces forwards ports, webpack's configuration is changed to obtain the full websocket URL from the client script, instead of only the hostname:
https://webpack.js.org/configuration/dev-server/#websocketurl