@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 • 542 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { use } from "react";
import { Script } from "./Script.js";
import { SSGContext } from "./SSGContext.js";
export const Body = function Body({ before, after, children, ...rest }) {
const { renderTags, mainScriptUrl } = use(SSGContext);
return (_jsxs("body", { ...rest, children: [before, renderTags("body-prepend"), children, renderTags("body"), mainScriptUrl && _jsx(Script, { type: "module", src: mainScriptUrl }), after] }));
};
//# sourceMappingURL=Body.js.map