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 529 B
import { addQueryParam } from "../utils/queryParam.js"; import { trailingSeparatorRE } from "../utils/trailingSeparatorRE.js"; const ssgComponentIdRe = /(\?|&)ssg-component(?:&|$)/; export function removeSsgComponentQuery(url) { return url.replace(ssgComponentIdRe, "$1").replace(trailingSeparatorRE, ""); } export function isSsgComponentId(id) { return ssgComponentIdRe.test(id); } export function createSsgComponentId(url) { return addQueryParam(url, "ssg-component"); } //# sourceMappingURL=isSsgComponentId.js.map