Re:WMR – Tiny all-in-one development tool for modern web apps
by developit on Thursday December 03, 2020 @04:17PM
(#25295106)
We've only shipped a helper library for Preact, but the Prerendering is actually generic. Some folks are working on helpers for other frameworks. The "API" is just a function exported from your first script tag:
export async function prerender(data) { return { html: "<h1>hi</h1>", links: ["/other-page"] } }
Hot reloading is a similar story, it's the same API as Vite and Snowpack:
if (import.meta.hot) import.meta.hot.accept(({ module }) => { do stuff }));