We are excited to introduce Next.js 10.2, featuring:
Update today by running npm i next@latest .
With Next.js 10.1, we improved Fast Refresh and decreased installation times . We're excited to share additional performance improvements enabled through webpack 5.
Today, we're expanding the rollout of webpack 5 to Next.js applications. Starting from Next.js 10.2, all applications that do not use a custom webpack configuration in their next.config.js will automatically use webpack 5.
When webpack 5 is enabled, you'll automatically get new features and improvements like:
We've worked hard to ensure a smooth transition from webpack 4 to 5. The Next.js core test suite with over 3,400 integration tests runs on every pull request with webpack 5 support enabled.
This is an excerpt. The full article is published by Next.js Blog.
Answers to common questions regarding this article's topic, architecture, and practical applications.
Next.js rewrites, redirects, and headers now support a new has property allowing you to match against incoming headers, cookies, and query strings. Vercel customer Joyn uses has to optimize content for both discoverability and performance. For example, you could redirect old browsers based on the User-Agent: module.exports = {
async redirects() {
return [
{
source: '/:path((?!old-browser$).*)',
has: [
{
General
Route changes are now announced to screen readers and other assistive technology by default. The example below shows the heading "Real Data. Real Performance" being announced by macOS VoiceOver on client-side navigation. The page name is found by first looking for an <h1> element, falling back to document.title, and lastly to the pathname. Thank you to Kyle Boss and Kitty Giraudel for helping land this feature.
General
With Next.js 10.1, we improved Fast Refresh and decreased installation times. We're excited to share additional performance improvements enabled through webpack 5. Today, we're expanding the rollout of webpack 5 to Next.js applications. Starting from Next.js 10.2, all applications that do not use a custom webpack configuration in their next.config.js will automatically use webpack 5. When webpack 5 is enabled, you'll automatically get new feature
General
82% of web pages for desktop use web fonts. Custom fonts are important for the branding, design, and cross-browser/device consistency of your site. However, using a web font should not come at the cost of performance. Next.js now supports Automatic Webfont Optimization when using web fonts. By default, Next.js will automatically inline font CSS at build time, eliminating an extra round trip to fetch font declarations. This results in improvements
General
We are excited to introduce Next.js 10.2, featuring: