@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.
9 lines • 420 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { use } from "react";
import { pathUrlWithBase } from "../pathUrlWithBase.js";
import { SSGContext } from "./SSGContext.js";
export const Link = function Link({ href, ...rest }) {
const { context } = use(SSGContext);
return (_jsx("link", { href: pathUrlWithBase(context.base, href), nonce: context.cspNonce, ...rest }));
};
//# sourceMappingURL=Link.js.map