Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Client port ignored #86

Closed
MatTheCat opened this issue Jul 10, 2018 · 2 comments · Fixed by #87
Closed

Client port ignored #86

MatTheCat opened this issue Jul 10, 2018 · 2 comments · Fixed by #87

Comments

@MatTheCat
Copy link

  • Operating System: Alpine 3.7.0
  • Node Version: 10.6.0
  • NPM Version: 6.1.0
  • webpack Version: 4.15.1
  • webpack-hot-client Version: 4.1.0

Expected Behavior

Websocket client uses client port.

Actual Behavior

Websocket client try using server port.

Code

  $ webpack-serve docs/webpack.config.js
serve.config.js
module.exports = {
  clipboard: false,
  devMiddleware: {
    publicPath: '/pattern-library/dist/'
  },
  hotClient: {
    allEntries: true,
    host: {
      client: '*',
      server: '127.0.0.1'
    },
    port: {
      client: 8082,
      server: 8081
    }
  },
  host: '0.0.0.0'
}

How Do We Reproduce?

Set hotClient.port as an object with different ports for client and server.

I tracked the issue until modifyCompiler. options.webSocket changes between the function call and beforeCompile event. No idea why.

@MatTheCat
Copy link
Author

MatTheCat commented Jul 10, 2018

@shellscape
Copy link
Contributor

Indeed. That and a few other spots. The logic is sneaky for that option.

shellscape added a commit that referenced this issue Jul 10, 2018
* fix: fixes #86, client port bungle

* test: update snapshots for dynamic ports
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants