Next.js 9.1.7 — smaller bundles, built-in polyfills, improved build output, and React Strict Mode
Key Points
- Smaller client bundles (3–8%+, ~7.5kB)
- Built-in polyfills: fetch, URL, Object.assign
- React Strict Mode opt-in + nightly React testing
Summary
Next.js 9.1.7 focuses on runtime size reduction, clearer production build output, compatibility improvements, and developer ergonomics. Most changes are non‑breaking: upgrade by running npm i next@latest react@latest react-dom@latest.
Key Points
- Client bundle size reductions (typical 3–4%, up to 6–8%+; ~7.5 kB saved on a hello-world app) through optimized JSX output and smaller polyfills.
- New built-in differential polyfills for
fetch(),URL, andObject.assign(removes many common dependency polyfills and avoids shipping bytes to modern browsers). - Redesigned production
next buildCLI: displays gzipped page sizes (excludes shared files) and classifies pages as Server, Static, or SSG; size thresholds colored for quick performance signaling (<130 kB green, 130–170 kB yellow, >170 kB red). - Page-loading improvements (CSS prioritized over JS, lower-priority/idle-time prefetching) to improve FCP and TTI.
- Support for modern JS features including Optional Chaining (
?.) and Nullish Coalescing (??) via the compiler. next exportnow deploys to Vercel with zero config (just usenext build && next exportin your build script).- Full Next.js client runtime is React Strict Mode compatible and opt-in via
module.exports = { reactStrictMode: true }innext.config.js. - Automated compatibility testing run against React’s nightly (
next) builds to surface future regressions.
Upgrade notes
- Non‑breaking release; update with
npm i next@latest react@latest react-dom@latestand test.
Quick action items for engineers
- Run the upgrade in staging and smoke-test pages for size/perf regressions.
- Remove duplicate polyfill dependencies (e.g.,
whatwg-fetch,unfetch,url,object-assign) where unnecessary. - Consider enabling
reactStrictModeincrementally to catch warnings early and prepare for future optimizations.