Skip to content

test(void): cover Markdown-only static builds on the Node target - #493

Open
honbin wants to merge 1 commit into
voidzero-dev:mainfrom
honbin:test/md-node-static-regression
Open

honbin wants to merge 1 commit into
voidzero-dev:mainfrom
honbin:test/md-node-static-regression

Conversation

@honbin

@honbin honbin commented Oct 19, 2026

Copy link
Copy Markdown

What

Adds a Markdown-only playground (playground/node-static-md) and an integration test (node-static-md.test.ts) for target: 'node' and output: 'static'. The test verifies that the pages are prerendered and reference no client-side JavaScript.

Why

Markdown pages are implicit islands. When all pages are Markdown, the islands plugin must contribute the islands-client build input so that the client build, whose closeBundle prerenders the pages, has an entry point.

Existing coverage doesn't exercise this exact combination:

  • markdown-blog / zero-js: include explicit island components and use the default Cloudflare target.
  • node-static: uses the Node target, but its React pages are not islands.

Without coverage for Markdown-only pages on the Node static target, a regression in this behavior could go unnoticed.

Verification

Verified against current main:

  • The test passes without source changes; the playground builds, prerenders its pages, and the generated HTML loads no client-side JavaScript.
  • Disabling the islands-client input causes the build to fail with UNRESOLVED_ENTRY, confirming that the test detects the regression it is intended to guard against.

Test and fixture only; no source changes.

🤖 Generated with Claude Code

Markdown pages are implicit islands, so a Markdown-only site under
target: 'node', output: 'static' relies on the islands plugin for the
client input that prerendering needs. No playground covers this
combination, so a regression there would go unnoticed.

Add a Markdown-only playground (node-static-md) and an integration test
that builds it and asserts the pages are prerendered and stay zero-JS.

Verified against current main: the test passes on existing code, and fails
(UNRESOLVED_ENTRY) when the islands client input is withheld.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@honbin
honbin requested a review from a team as a code owner October 19, 2026 07:53

This branch has not been deployed

No deployments
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