openaienmodel: gpt-5-mini-2025-08-07
Next.js 9.4 — Fast Refresh, ISR, built-in fetch, env
Key Points
- Fast Refresh enabled by default
- Incremental Static Regeneration (beta)
- Built-in fetch polyfill for Node and browsers
Summary
Next.js 9.4 (2020-05-11) adds Fast Refresh by default, Incremental Static Regeneration (ISR, beta), built-in fetch for Node and browsers, .env support plus NEXT_PUBLIC_ prefix, Web Vitals reporting, absolute imports/aliases, configurable Sass options, and new CMS examples. These changes focus on developer experience, predictable static regeneration, and simpler configuration.
Key Points
- Fast Refresh (default): reliable hot reloading that preserves component state, with a redesigned error overlay showing accurate locations and editor click-to-open.
- Incremental Static Regeneration (beta): background re-generation of static pages via
unstable_revalidate, serving static pages with no downtime and bounded re-generation concurrency. - Environment variables: automatic .env loading; prefix variables with
NEXT_PUBLIC_to inline them into the browser bundle (no next.config.js needed). - Built-in fetch polyfill:
fetch()is available in both Node and browsers; remove server-side polyfills likenode-fetchorisomorphic-unfetch. - Web Vitals: export
reportWebVitals(metric)frompages/_app.jsto forward Core Web Vitals to analytics. - Absolute imports & aliases: set
baseUrlinjsconfig.json/tsconfig.jsonand usepathsfor custom aliases (e.g.@/design-system/*). - Configurable Sass: use
sassOptionsinnext.config.jsto setincludePathsand other compiler options. - Extras: new CMS examples (Contentful, DatoCMS, Prismic, Sanity, TakeShape) and improved log output.
Upgrade notes
- Fast Refresh is enabled automatically; verify hot-reload behavior in your app.
- ISR is beta and uses
unstable_revalidate; test re-generation logic and monitor failures. - Remove server-side fetch polyfills and rely on built-in
fetch()in data fetching functions. - Move browser-exposed env vars to
NEXT_PUBLIC_and use.envfiles for local/production variables.