News for hackers. Stuff that matters.
Re:WMR – Tiny all-in-one development tool for modern web apps by brundolf on Thursday December 03, 2020 @02:32PM (#25293458)
I assume features like prerendering HTML must only work for Preact though, right? That requires some significant assumptions about the codebase (compared to tools like Babel and Webpack). Also, hot reloading seems to only work for Preact components (based on the wording)
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 }));