cloudflare/vinext

Pages Router streaming SSR: `styled-jsx` rules not emitted in canonical Next.js format

Open

#1.556 geöffnet am 22. Mai 2026

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (329 Forks)github user discovery
adapter-api-e2ehelp wanted

Repository-Metriken

Stars
 (8.120 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 1h) (462 gemergte PRs in 30 T)

Beschreibung

This issue was created by an agent analysing CI failures from the Next.js Deploy Suite (vinext main vs Next.js v16.2.6, 2026-05-22).

Problem

With custom Next config enabling streaming, a page using styled-jsx should produce inline minified CSS like <style>p{color:blue}</style> in the SSR output. vinext does emit literal CSS inside <style>, but the rule is multi-line / unminified so the canonical match pattern /color:(?:blue|#00f)/ fails. The styled-jsx transform is not producing the expected minified output format.

Expected pattern: /color:(?:blue|#00f)/
Received: ...<style>\n  p {\n    color: blue;\n  }\n</style>...

Estimated Impact

~1 test failures across the deploy suite.

Affected Test Suites

  • test/e2e/streaming-ssr/index.test.ts

Recommendation

  1. Reproduce first in vinext's own test suite. Add a Pages Router streaming-SSR page using styled-jsx and assert the emitted <style> block matches the canonical minified shape Next.js produces.

  2. Run the styled-jsx transform. The styled-jsx Babel/SWC plugin should produce minified CSS. Ensure that runs for streaming-SSR builds too.


Part of #1328.

Contributor Guide