scorebuilders / sbuilder-webapp

0 stars 0 forks source link

Needs Solution: how to serve index.html from any URL while using webpack dev server? #4

Closed pkarl closed 8 years ago

pkarl commented 8 years ago

Webpack dev server + hmr is invaluable to our work, but every time the goddamn thing refreshes on a non-root page, it serves up a cannot GET [someroute] express error.

Is the some configuration or duck punching we can do to make /, /s/[sessionId], and /d/[sessionId] all load the same client files?

pkarl commented 8 years ago

Maybe relevant http://www.unknownerror.org/opensource/webpack/webpack/q/stackoverflow/26203725/how-to-allow-for-webpack-dev-server-to-allow-entry-points-from-react-router

pkarl commented 8 years ago

Getting closer, going to try this: http://jaketrent.com/post/pushstate-webpack-dev-server/

...

...
devServer: {
    port: 3000,
    historyApiFallback: true
  }
pkarl commented 8 years ago

Accidentally referenced PR from PR instead of issue -_-, closing thanks to #9