Skip to content

szymonkorytnicki/screenshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

screenshot

Create screenshot on each Hot Module Reload event and combine them into interactive video.

  • Create plugins for Vite, Webpack etc.
  • Ability to configure video, quality, speed... etc

PoC for Vite:

if (import.meta.hot) {
  import.meta.hot.on("vite:afterUpdate", () => {
    const screenshotTarget = document.body;
    console.log("doing");
    html2canvas(screenshotTarget).then((canvas) => {
      const base64image = canvas.toDataURL("image/png");
      const img = document.createElement("img");
      img.src = base64image;
      document.body.appendChild(img);
    });
  });
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published