Skip to content

Scalar fixes#93

Open
nicoalba wants to merge 16 commits into
mainfrom
scalar-k
Open

Scalar fixes#93
nicoalba wants to merge 16 commits into
mainfrom
scalar-k

Conversation

@nicoalba
Copy link
Copy Markdown
Contributor

Scalar fixes

nicoalba and others added 6 commits May 19, 2026 16:33
theme/ files use @docusaurus/router, a Docusaurus virtual module that
only resolves in webpack context — not during standalone tsc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nf-theme-sandbox Ready Ready Preview, Comment May 20, 2026 7:39pm
unified-doc-preview Error Error May 20, 2026 7:39pm

Request Review

nicoalba and others added 2 commits May 19, 2026 21:25
@docusaurus/router is a webpack virtual module that tsc can't resolve.
Adding a module declaration lets tsc compile theme/**/* (which produces
dist/theme/ for getThemePath()) without errors.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ScalarDocusaurus override (which calls instance.destroy() on unmount
to prevent Ctrl+K listener leaks) now lives in the theme package and is
applied automatically to any site that has @scalar/docusaurus installed,
via a configureWebpack hook. Sites no longer need their own copy of the
component or a manual webpack alias.

Also declare @docusaurus/router and @theme/Layout as virtual modules so
tsc can compile theme/ files without errors.

Bumps to 0.12.3.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
searchHotKey: 'i' in each site's Scalar config resolves the Ctrl+K
conflict at the source. The SearchBar onApiPage guard and
ScalarDocusaurus destroy() override are no longer needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants