Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants