UNPKG

@wroud/vite-plugin-ssg

Version:

A Vite plugin for static site generation (SSG) with React. Renders React applications to static HTML for faster load times and improved SEO.

13 lines 510 B
import { addQueryParam } from "../utils/queryParam.js"; import { trailingSeparatorRE } from "../utils/trailingSeparatorRE.js"; const ssgRE = /(\?|&)ssr-server-entry(?:&|$)/; export function removeSsgServerEntryQuery(url) { return url.replace(ssgRE, "$1").replace(trailingSeparatorRE, ""); } export function isSsgServerEntryId(id) { return ssgRE.test(id); } export function createSsgServerEntryId(url) { return addQueryParam(url, "ssr-server-entry"); } //# sourceMappingURL=isSsgServerEntryId.js.map