Skip to content

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

Notifications You must be signed in to change notification settings

Jarred-Sumner/bun-livereload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published