Releases: rschristian/vite-prerender-plugin
Releases · rschristian/vite-prerender-plugin
0.5.0
Features
- Warns if the
prerender
function returns nothing, rather than moving on silently - Ensures Vite's modulepreload polyfill is inlined
Bug Fixes
- Corrects bad options destructure, throwing an error if an empty object isn't passed
- Ensures JS assets also have source map comments stripped if the user hasn't enabled them themselves
Full Changelog: 0.4.0...0.5.0
0.3.0
Features
- Adds new
parseLinks
export to mirror the functionality ofpreact-iso
'sprerender
. 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