Skip to content
This repository has been archived by the owner on Apr 8, 2019. It is now read-only.

[bug] searching available ports doesn't work in some cases #130

Closed
1 of 3 tasks
alexander-akait opened this issue May 11, 2018 · 0 comments · Fixed by #133
Closed
1 of 3 tasks

[bug] searching available ports doesn't work in some cases #130

alexander-akait opened this issue May 11, 2018 · 0 comments · Fixed by #133

Comments

@alexander-akait
Copy link
Member

alexander-akait commented May 11, 2018

  • Operating System: Ubuntu 17.10
  • Node Version: 10.1.0
  • NPM Version: 6.0.1
  • webpack Version: 4.8.1
  • webpack-serve Version: 0.3.2

This issue is for a:

  • bug
  • feature request
  • modification request

Code

from https://github.com/webpack-contrib/webpack-serve/blob/master/docs/addons/proxy-router.config.js

{
  content: [__dirname],
  add: (app, middleware, options) => {
    // since we're manipulating the order of middleware added, we need to handle
    // adding these two internal middleware functions.
    middleware.webpack();
    middleware.content();

    // router *must* be the last middleware added
    app.use(router.routes());
  },
}
CLI Command
  $ webpack-serve
webpack.config.js

no matter

Expected Behavior

Autosearch available ports should be work.

Actual Behavior

First we run add https://github.com/webpack-contrib/webpack-serve/blob/master/lib/server.js#L88 (in add re call middleware.webpack()), but in this moment option port is 8080 and for hot is 8081. Detecting available ports happens only here https://github.com/webpack-contrib/webpack-serve/blob/master/lib/server.js#L124. I.E. initialization webpack-hot-client always use 8081 port.

I can't run multiple webpack-server in this case.

How Do We Reproduce?

Try to run two examples https://github.com/webpack-contrib/webpack-serve/blob/master/lib/server.js#L88

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