electron-userland / electron-userland/electron-webpack
webpack reload for SPA with vue.. `Cannot GET /last_SPA_path` can we redirect all "requests" to `/` where vue app exists?
- Dominant language
- TypeScript
- Stars
- 902
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
* **Version**:
`"^2.7.4"`
* **Target**:
N/A, not just developing right now..
I'm building a vue "SPA" using electron-webpack. So far experience has been great, however in development when I hot-reload the module I get a redirect to the page (e.g. `/login` the I was previously on, to which the webpack dev server responds with `Cannot GET /login`.
To my understanding, this is caused by dev-server reloading attempting to navigate to `/login` before the vue app loads and understands that vue-router is supposed to handle the routing.
Simple fix (or so it seemed) that works for my case would be to force webpack-dev-server to redirect back to the root URL, where the vue app is hosted. Looking at docs, there seem to be a couple configurable options like `module.hot` but it's not clear hot I can tie this into the electron-webpack module.
this seems like it could be a pretty common occurrence for electron-webpack users and I'm happy to to make a PR adding documentation on this case when I find something that works.
Thanks guys and gals!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.