Skip to content

hotfix: 1.6.1 - #112

Merged
ryanaidilp merged 2 commits into
mainfrom
hotfix/1.6.1
Oct 23, 2026
Merged

ryanaidilp merged 2 commits into
mainfrom
hotfix/1.6.1

Conversation

@ryanaidilp

Copy link
Copy Markdown
Contributor

Fixes a production bug in release 1.6.0.

Problem

The built site failed with ReferenceError: Prism is not defined. The Home page showed only the nav and footer. No docs page showed its code panel. The dev server hid the problem, because it loads modules in a different order.

Cause

The language grammars in prismjs/components call a global Prism. The redesign dropped the step that publishes window.Prism first. The bundler does not guarantee that the core runs before a side-effect import.

Fix

A new module, src/lib/prism-global.ts, sets globalThis.Prism and is imported first by prism-setup.ts. This restores the approach from commit 3ba7d20.

Checked on the production build

  • Home renders the title, the stat card and a highlighted code panel.
  • All 21 docs sections render. 19 have code panels, 27 in total, and all are highlighted.
  • Typecheck and the 11 tests pass.

Follow-up

CI only checks that the build succeeds. It does not load the built site, so it could not catch this. A smoke test that opens the built Home page would catch it.

The production build failed with 'Prism is not defined': the Home page rendered
no content and no docs page showed its code panel. The grammars in
prismjs/components call a global Prism, and the bundler does not guarantee that
the core publishes it first. A small prism-global module sets it explicitly
before any grammar is imported. Checked on the built site: Home and all 21 docs
sections render, and every code panel is highlighted.
@ryanaidilp
ryanaidilp merged commit 498ebd5 into main Oct 23, 2026
10 checks passed
@github-actions
github-actions Bot deleted the hotfix/1.6.1 branch October 23, 2026 15:21
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