With default config (compress not disabled), next start gzips page renders but sends
every Route Handler response uncompressed — including metadata routes like app/sitemap.js.
Real-world sitemaps are routinely hundreds of KB of XML, all sent as identity to crawlers.
npm install
npm run build
npm run startThen:
curl -s -H 'Accept-Encoding: gzip, br' -D - -o /dev/null http://127.0.0.1:3000/
curl -s -H 'Accept-Encoding: gzip, br' -D - -o /dev/null http://127.0.0.1:3000/sitemap.xml
curl -s -H 'Accept-Encoding: gzip, br' -D - -o /dev/null http://127.0.0.1:3000/d.xml| Route | Kind | Content-Encoding |
|---|---|---|
/ |
page | gzip ✅ |
/sitemap.xml |
metadata route (prerendered ○) | (none) ❌ |
/d.xml |
route handler (force-dynamic ƒ) | (none) ❌ |
Both bodies are far above the bundled compression middleware's 1KB threshold, and
application/xml is compressible: true in mime-db (same result with text/plain).
Reproduced on next 16.2.10, 16.3.3 (latest) and 16.4.0-canary.9.