reactql icon indicating copy to clipboard operation
reactql copied to clipboard

Hot reload of Koa server (HMR)

Open ZimboQC opened this issue 6 years ago • 2 comments

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!

ZimboQC avatar Feb 13 '19 20:02 ZimboQC

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!

leebenson avatar May 12 '19 12:05 leebenson

+1 for Koa hot reload!

beepsoft avatar May 22 '19 11:05 beepsoft