webpack-plugin-serve icon indicating copy to clipboard operation
webpack-plugin-serve copied to clipboard

Connecting to the client via a remote URL

Open rafpaf opened this issue 4 years ago • 0 comments

  • Webpack Version: 5.42.0
  • Operating System (or Browser): Ubuntu 20.04
  • Node Version: v14.17.0
  • webpack-plugin-serve Version: 1.4.1

I'm developing remotely, so I need webpack-plugin-serve to connect to a URL like ws://dev.example.com/wps. The plugin is still attempting to connect at ws://localhost:9000/wps, even though I have set the client option to { protocol: "ws", address: "147.147.147.147:9000" }.

In my webpack.config.js, the options are as follows. (These aren't my actual IP address and host, of course.)

      new Serve({
        port: 9000,
        client: { protocol: "ws", address: "147.147.147.147:9000" },
        host: "dev.assets.example.com",
        compress: true,
        hmr: true,
        static: "./dist",
      }),

rafpaf avatar Jul 26 '21 16:07 rafpaf