fumadocs-core
Version:
The React.js library for building a documentation website
22 lines (21 loc) • 658 B
JavaScript
// src/server.browser.ts
/**
* Browser stub: Markdown rendering is server-only, components generated by
* `remarkLLMs` with `output: 'function'` render `null` in the browser.
*/
function asMarkdown() {
return false;
}
function jsxComponents(components) {
return components ?? {};
}
async function renderToMarkdown() {
throw new Error("`renderToMarkdown` is only available on the server.");
}
async function renderRoute(_element) {
throw new Error("`renderRoute` is only available on the server.");
}
const md = () => {
throw new Error("`md` is only available on the server.");
};
export { asMarkdown, jsxComponents, md, renderRoute, renderToMarkdown };