cloudflare / cloudflare/vinext
Pages Router streaming SSR: `styled-jsx` rules not emitted in canonical Next.js format
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 406
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 120
Description
> *This issue was created by an agent analysing CI failures from the [Next.js Deploy Suite](https://github.com/cloudflare/vinext/actions/runs/26282973805) (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 `p{color:blue}` in the SSR output. vinext does emit literal CSS inside ``, 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...
```
## 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 `` 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
Assessment
This issue has not been assessed yet.