@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.
12 lines • 360 B
JavaScript
import path from "node:path";
import { getPageName } from "../utils/getPageName.js";
export function removeSsgUrl(url) {
return getPageName(url.replace("/@ssg/", ""));
}
export function isSsgUrl(id) {
return id.startsWith("/@ssg/");
}
export function createSsgUrl(url) {
return path.posix.join("/@ssg/", url);
}
//# sourceMappingURL=isSsgUrl.js.map