Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions apps/docs/snippets/components/superdoc-editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,18 @@ export const SuperDocEditor = ({
if (isDev) {
try {
const res = await fetch(`${DEV_DIST_URL}/superdoc.umd.js`, { method: 'HEAD' });
if (res.ok) return DEV_DIST_URL;
} catch {}
if (res.ok) {
console.info('[SuperDoc Docs] Using local build from', DEV_DIST_URL);
return DEV_DIST_URL;
}
console.warn('[SuperDoc Docs] Local dev server returned', res.status, '— falling back to unpkg');
} catch (err) {
console.warn(
'[SuperDoc Docs] Local dev server not reachable — falling back to unpkg.',
'Run `pnpm dev:docs` from the repo root to use your local build.',
err.message,
);
}
}

return UNPKG_DIST_URL;
Expand Down