PepsRyuu / nollup

Rollup compatible development bundler for fast rebuilds and HMR.
MIT License
487 stars 28 forks source link

Nollup for backend #217

Open derolf opened 2 years ago

derolf commented 2 years ago

We are using rollup to bundle a backend server (nodejs with koa).

For development, we run rollup in watch mode with the run-plugin that initially starts and then restarts the sever on every change.

Would be nice to use nollup with HMR instead.

Possible?

PepsRyuu commented 2 years ago

Hmmm. Off the top of my head, although Nollup is written for browsers in mind, if the browsers API were polyfilled (ie. WebSocket), it could probably work. I've never attempted anything like it before. Do you have a sample project of what you're doing at the moment?

Looking at the run plugin specifically. It looks like it depends on writeBundle, which is intentionally not implemented because Nollup never writes to disk. So that's going to be an issue that will need to be resolved somehow.