Pages Router streaming SSR: `styled-jsx` rules not emitted in canonical Next.js format
#1.556 geöffnet am 22. Mai 2026
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
mainvs Next.jsv16.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
-
Reproduce first in vinext's own test suite. Add a Pages Router streaming-SSR page using
styled-jsxand assert the emitted<style>block matches the canonical minified shape Next.js produces. -
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.