1.0.3 • Published 2 years ago

bun-livereload v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

bun-livereload

Wrap a function with bun-livereload to automatically reload any imports inside the function the next time it is called.

import liveReload from "bun-livereload";

export default {
  fetch: liveReload(async function (req: Request) {
    const { render } = await import("./my-page.js");
    return new Response(render(req));
  }),
};

Install

bun add bun-livereload