webpack-hot-client icon indicating copy to clipboard operation
webpack-hot-client copied to clipboard

Fix bugs when using the server option together with different client/server URLs

Open hedgepigdaniel opened this issue 5 years ago • 3 comments

This PR contains a:

  • [x] bugfix
  • [ ] new feature
  • [ ] code refactor
  • [ ] test update
  • [ ] typo fix
  • [ ] metadata update

Motivation / Use-Case

Having a different browser address and server address is useful if there is a proxy in between. The server option is useful because it removes the need to have two servers and two ports.

There are two bugs fixed:

  • The validation code previously rejected a configuration such as this:
{
  host: {
    client: 'someurl',
  },
  port: {
    client: 80
  },
  server,
}

even though the provided server is already listening on a host/port

  • When the server option was used, the client ignored the host.client setting

Breaking Changes

None

Additional Info

hedgepigdaniel avatar May 15 '19 11:05 hedgepigdaniel

Can we get this merged? this would be super helpful

aaronup avatar Nov 08 '19 23:11 aaronup

You would be better off asking here: https://github.com/shellscape/webpack-hot-client

hedgepigdaniel avatar Feb 18 '20 21:02 hedgepigdaniel

Or use my fork, webpack-hmr-client

hedgepigdaniel avatar Feb 18 '20 21:02 hedgepigdaniel