Skip to content

fix(docs): ship import map in prod and remove dead theme toggle#389

Merged
hkonsti merged 1 commit into
mainfrom
hkonsti/fix-docs-specifier-and-lightmode
Jul 9, 2026
Merged

fix(docs): ship import map in prod and remove dead theme toggle#389
hkonsti merged 1 commit into
mainfrom
hkonsti/fix-docs-specifier-and-lightmode

Conversation

@hkonsti

@hkonsti hkonsti commented Jul 9, 2026

Copy link
Copy Markdown
Member

The fiddles' import map was injected by reading src/generated/modules.json via fs.readFileSync at render time. Next's file tracing doesn't follow that computed path, so the file is dropped from the production server bundle, the read throws, and the import map silently disappears - breaking every fiddle's runtime import('@revideo/2d') with 'bare specifier ... not remapped'. Import the manifest statically so Next bundles it in.

Also hide Nextra's sidebar theme switch (darkMode={false}): the docs are hard-forced to dark, so the toggle did nothing.

The fiddles' import map was injected by reading src/generated/modules.json via
fs.readFileSync at render time. Next's file tracing doesn't follow that
computed path, so the file is dropped from the production server bundle, the
read throws, and the import map silently disappears - breaking every fiddle's
runtime import('@revideo/2d') with 'bare specifier ... not remapped'. Import
the manifest statically so Next bundles it in.

Also hide Nextra's sidebar theme switch (darkMode={false}): the docs are
hard-forced to dark, so the toggle did nothing.
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
revideo-docs Ready Ready Preview, Comment Jul 9, 2026 7:57pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
revideo-docs-redirect Skipped Skipped Jul 9, 2026 7:57pm

Request Review

@hkonsti hkonsti merged commit 68b9a58 into main Jul 9, 2026
10 checks passed
@hkonsti hkonsti deleted the hkonsti/fix-docs-specifier-and-lightmode branch July 9, 2026 20:01
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.

1 participant