olebedev / go-starter-kit

[abandoned] Golang isomorphic react/hot reloadable/redux/css-modules/SSR starter kit
Other
2.82k stars 359 forks source link

replace hot-proxy.js with webpack-dev-server #75

Closed tracker1 closed 7 years ago

tracker1 commented 7 years ago

Webpack-dev-server already has an option to reverse proxy... Unless you are proxying websockets to the go server, in which case there's some changes pending iirc.

olebedev commented 7 years ago

I don remember, exactly, but seems there were some limitations to plug webpack-dev-server in. Are you sure that all used functionality built in webpack-dev-server and we could migrate to it easily?

Anyway, the price is yet another file in the root folder(./hot.proxy.js), nothing else.

tracker1 commented 7 years ago

The main limitation I've seen is that websockets won't be proxied... I'm using it right now, and the passthrough is for anything that isn't served by webpack-dev-server is passed through...

My devserver config...

{
  hot: true,
  overlay: false,
  noInfo: true,

  publicPath: '/client/',

  proxy: {
    '**': `http://localhost:${API_PORT}/`,
  },
  stats: { colors: true },
}

Also, it's not a huge deal either way... just a suggestion.

olebedev commented 7 years ago

Thanks @tracker1!

But I would prefer to let be as it was.

abzfarah commented 7 years ago

Hey guys

Now that webpack dev server supports WS, what do you think about replacing hot-proxy?