martyjs

Why do we need a proxy on an express.js server in order to get webpack hot reloading server functionality combined with react-routing

放肆的年华 提交于 2019-12-06 02:25:38
问题 Optional info: I'm trying to make this project built with marty.js and webpack dev server allow entry points from react-router so that it works in more than just the \ path. Thus, I'm studying THIS stack overflow answer all day long and I fail to understand the logic behind the following code and why this answer works. retozi answered: I set up a proxy to achieve this: You have a regular express webserver that serves the index.html on any > route, except if its an asset route. if it is an

Why do we need a proxy on an express.js server in order to get webpack hot reloading server functionality combined with react-routing

為{幸葍}努か 提交于 2019-12-04 07:35:26
Optional info: I'm trying to make this project built with marty.js and webpack dev server allow entry points from react-router so that it works in more than just the \ path. Thus, I'm studying THIS stack overflow answer all day long and I fail to understand the logic behind the following code and why this answer works. retozi answered: I set up a proxy to achieve this: You have a regular express webserver that serves the index.html on any > route, except if its an asset route. if it is an asset, the request gets proxied to the web-dev-server your react hot entrypoints will still point directly