Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot reload of Koa server (HMR) #147

Open
ZimboQC opened this issue Feb 13, 2019 · 2 comments
Open

Hot reload of Koa server (HMR) #147

ZimboQC opened this issue Feb 13, 2019 · 2 comments

Comments

@ZimboQC
Copy link

ZimboQC commented Feb 13, 2019

Hot reload works perfectly for components, lib & entry folder, but I'm unable to make it works in app.js (I've put an apollo server at that level)

How to get hot-reload at all levels?

Thanks!

@leebenson
Copy link
Owner

This is on my radar, but I'm punting on it for the time being because it's a sizeable refactor.

The current Koa Webpack hot reloading flow requires that entry/server.tsx exports a default function that is in the shape of a Koa middleware function. That would need ripping out, and HMR on the server would be replaced with a new function that takes the full koa instance, and re-builds in Webpack whenever there's a change.

I plan to tackle this soon, just don't have the cycles for it yet. In the meantime, if anyone wants to submit a PR, this would be a great one to focus on!

@beepsoft
Copy link

+1 for Koa hot reload!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants