Skip to content

webpack-dev-server/client added twice #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RafalFilipek opened this issue Dec 5, 2016 · 2 comments
Closed

webpack-dev-server/client added twice #711

RafalFilipek opened this issue Dec 5, 2016 · 2 comments

Comments

@RafalFilipek
Copy link

RafalFilipek commented Dec 5, 2016

Hi!

My webpack.config.js

const path = require('path');

module.exports = {
  entry: [
    'webpack-dev-server/client?https://my.address.com/',
    'webpack/hot/only-dev-server',
    './index.js',
  ],
  output: {
    filename: "build.js",
    path: path.join(__dirname, 'static'),
  },
  devServer: {
    contentBase: path.join(__dirname, 'static'),
    proxy: {
      '**': {
        target: 'https://my.addres.com/t/',
        secure: false
      }
    }
  }
}

I work with reversed ssh tunnel like

ssh -v -N -R :9010:localhost:8080 my.address.com

and standard command to run webpack-dev-server npm run: webpack-dev-server

The problem is that I have two initialised WS connections.

First invalid because in my build.js file I found

/* WEBPACK VAR INJECTION */}.call(exports, "?http://localhost:8080"))

and second (correct), pointing to https://my.address.com/.

WS connection should established only once for address I provided.

Webpack: 2.1.0-beta.27
Webpack dev server: 2.1.0-beta.12

@SpaceK33z
Copy link
Member

When you're using the CLI, it will automatically add "webpack-dev-server/client" for you.

You can do two things:

  • Remove the client from your entry, and run the CLI with webpack-dev-server --public=my.address.com
  • Add --no-inline to your CLI.

@RafalFilipek
Copy link
Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants