Skip to content

0.3.0

Compare
Choose a tag to compare
@rschristian rschristian released this 10 Jul 05:33
· 32 commits to master since this release

Features

  • Adds new parseLinks export to mirror the functionality of preact-iso's prerender. This allows you to easily crawl through generated anchor tags to find additional links for the prerenderer:
export async function prerender(data) {
    const { renderToString } = await import('react-dom/server');
+   const { parseLinks } = await import('vite-prerender-plugin/parse');

    const html = await renderToString(<App {...data} />);
+   const links = parseLinks(html);

+   return { html, links };
}

Bug Fixes

  • Corrects bad regex for stripping out source maps, resulting in erroneous "missing source map" warnings in the browser

Full Changelog: 0.2.2...0.3.0