# Next.js 16.3 預設開啟磁碟快取，dev 記憶體最多降 90%、部分專案的 CI warm path 建置速度最高為原本 5.5 倍

> 📖 本站完整內容索引（documentation index）：[llms.txt](/llms.txt)

> 原作者：Next.js (@nextjs) · 策展與摘要：EasyVibeCoding · 平台：X (Twitter) · 熱度：🔥🔥🔥🔥 · 日期：2026-08-04

> 原始來源：https://x.com/nextjs/status/2084399799642841419

## 證據與延伸閱讀

- [Next.js 16.3發布](https://nextjs.org/blog/next-16-3) — 官方文件
- [Turbopack記憶體減少](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopackMemoryEviction) — 官方文件
- [next build檔案系統快取](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopackFileSystemCache) — 官方文件
- [TypeScript 7型別檢查](https://nextjs.org/docs/app/api-reference/config/next-config-js/useTypeScriptCli) — 官方文件
- [Turbopack支援import.meta.glob](https://nextjs.org/docs/app/api-reference/turbopack#importmetaglob) — 官方文件
- [AGENTS.md區塊維護](https://nextjs.org/docs/app/guides/ai-agents) — 官方文件
- [next-dev-loop Skills](https://www.skills.sh/vercel/next.js/next-dev-loop)
- [catchError錯誤邊界](https://nextjs.org/docs/app/getting-started/error-handling#nested-error-boundaries) — 官方文件
- [Instant Navigations導覽](https://nextjs.org/docs/app/guides/instant-navigation#validate-instant-navigation) — 官方文件
- [Rust-based React Compiler](https://nextjs.org/docs/app/api-reference/config/next-config-js/turbopackRustReactCompiler) — 官方文件

## 中文摘要

Next.js 16.3 預設開啟磁碟快取，dev 記憶體最多降 90%、部分專案的 CI warm path 建置速度最高為原本 5.5 倍。

**版本重點** Next.js 於 2026 年 8 月 4 日發布 16.3，主軸是讓既有專案不需修改程式碼即可獲得效能改善，同時以選用功能帶來接近 SPA 的即時導覽體驗；官方建議升級，指引見[Next.js 16.3](https://nextjs.org/blog/next-16-3) 。

**效能改善**

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/04507e42b2ac3c54.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399815593701449)（回覆）｜Next.js 在編譯 50 個路由後，vercel.com (dashboard) 的記憶體用量減少約 90% 至 2 GB，nextjs.org 減少約 82% 至 840 MB

- Turbopack 的 `next dev` 透過預設啟用的磁碟快取與 memory eviction，開發期間最多減少 90% 記憶體使用量；`vercel.com` 在編譯 50 條路由後由 21.5 GB 降至 2 GB，`nextjs.org` 則由 4,600 MB 降至 840 MB。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/e1961de95093c834.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399830521282958)（回覆）｜Turbopack 啟用快取後可大幅縮短 `next build` 編譯時間，其中 vercel.com/geist 專案建置速度最高約為原本 5.5 倍（30 秒降至 5.5 秒）

- `next build` 現在也預設使用檔案系統快取，CI 的 warm path 建置速度最高為原本 5.5 倍；`vercel.com/geist` 的時間由 30 秒降至 5.5 秒。
- `next build` 可搭配原生實作、宣稱編譯速度成長為 10 倍的原生實作 TypeScript 7 進行型別檢查：
```bash
pnpm add -D typescript@^7
```
貼文另列出的安裝方式是：
```bash
npm install -D typescript@7
```

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/7cccca836f4b360f.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399861487800585)（回覆）｜Node.js streams 在 Next.js App Router 伺服器端渲染中比原本的 Web streams 多處理約 22% 的負載請求

- App Router 渲染改用原生 Node.js streams，移除 web streams 轉換負擔；官方基準測試顯示負載下最多可多處理 22% 的請求。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/408116ecd4bad1b1.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399893410730045)（回覆）｜使用 JavaScript 語法讀取 `./posts/*.md` 檔案並渲染文章標題列表的程式碼片段

- Turbopack 支援 Vite 相容的 `import.meta.glob`，可載入多個檔案，並為讀取本機 Markdown 等檔案的 Server Components 提供 hot-module reloading。

**AI Agent 與錯誤處理** `next dev` 會維護 `AGENTS.md` 區塊，指向與專案 Next.js 版本相符、位於本機 node modules 的文件，避免 coding agents 依賴過時訓練資料。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/ddc0388106a7840c.png)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399909638402057)（回覆）｜為 Agent 專用的 Next.js 規則說明區塊，位於 `<!-- BEGIN:nextjs-agent-rules -->` 與 `<!-- END:nextjs-agent-rules -->` 標籤之間，提醒 Agent 該版本包含破壞性變更、API 與檔案結構與訓練資料不同，並指示在編寫任何程式碼前先閱讀 `node_modules/next/dist/docs/` 中的相關指南。

 16.3 也加入以多步工作流程為導向的 first-party Skills，例如 `next-dev-loop`；原文提供的安裝指令為：
```bash
npx skills add vercel/next.js --skill next-dev-loop
```

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/201e39f0c940d5d8.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399990475300898)（回覆）｜透過終端機指令新增與管理 vercel/next.js 相關 skill 的命令列表，展示 agent 驅動瀏覽器、啟用 Cache Components、優化路由以及開啟 Partial Prefetching 的具體操作

新的 `catchError` 可建立不攔截 `notFound` 與 `redirect` 的 custom error boundary，並透過 `retry()` 重新取得失敗資料、重新渲染 Server Components：
```tsx
'use client';
import { catchError, type ErrorInfo } from 'next/error';

function ErrorFallback(props: { title: string }, { error, retry }: ErrorInfo) {
  return (
    <div>
      <h2>{props.title}</h2>
      <p>{error.message}</p>
      <button onClick={() => retry()}>Try again</button>
    </div>
  );
}

export default catchError(ErrorFallback);
```

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/afefa9d003119b61.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399877661118925)（回覆）｜app/my-error-boundary.tsx 檔案中定義 ErrorFallback 錯誤邊界元件的程式碼片段

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/5bf965a8ca9a0d3c.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399926080094507)（回覆）｜Next.js 錯誤診斷介面顯示導覽期間遇到未快取的資料，並在程式碼片段中指出 `app/subnav/post/page.tsx` 的第 3 行發生問題，同時於下方提供 Stream、Cache 與 Block 三種修復方式的建議選項。

**Instant Navigations** 這套選用功能回應 Next.js 過去「Server Components 減少 JavaScript，卻可能讓導覽感覺變慢」、快取模型隱含且 prefetch 過度積極等問題。啟用 `cacheComponents` 與 `partialPrefetching`：

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/10364b1ce42a888b.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399846153404566)（回覆）｜next.config.ts 的 TypeScript 範例程式碼

```ts
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
  cacheComponents: true,
  partialPrefetching: true,
};

export default nextConfig;
```
其中 Partial Prefetching 能控制連結預先載入最小 loading shell、部分渲染頁面或完整內容；Navigation Inspector 可在開發時暫停導覽，檢查哪些內容立即顯示、哪些需等待網路。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/2fd3cdbfa6842cff.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399957847719993)（回覆）｜Navigation Inspector 偵錯工具介面，顯示 debugger 已暫停於 `/store/shoes` 的頁面初始載入（page load）狀態，並提供 Resume 按鈕與 Pause on navigations 開關設定。

 Instant Insights 會標示非即時導覽並提供修正 prompt；`instant()` 則能以 Playwright 防止重構再次造成速度退化。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/25ccde801b12d471.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399973756711364)（回覆）｜使用 Playwright 與 `@next/playwright` 進行端對端測試的程式碼片段

 官方表示這些行為未來主要版本將成為預設，方向是回到「預設動態、沒有隱藏或隱含快取」。

**實驗功能與升級** Rust-based React Compiler 可在 Turbopack 內取代 Babel，`v0` 測試中 cold build 到可用頁面快 34%、warm build 快 46%（前提是已完全不再使用 Babel；若仍保留其他 Babel 轉換，增益會較小）；Network resilience 則讓離線請求保持 pending，並在重新連線後重試。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/161b51cedc458d22.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084399942618263752)（回覆）｜兩個對比狀態的音樂播放介面，左側顯示載入中的灰色佔位區塊，右側顯示已載入的藍色專輯封面與曲目資訊，兩者下方皆帶有「You're offline — reconnecting...」的連線狀態提示。

 啟用方式為：

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/206cf3f44cea1368.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084400007000805693)（回覆）｜`next.config.ts` 檔案內容，設定 `reactCompiler` 與 `experimental.turbopackRustReactCompiler` 屬性

```ts
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
  reactCompiler: true,
  experimental: {
    turbopackRustReactCompiler: true,
  },
};

export default nextConfig;
```

```ts
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
  experimental: {
    useOffline: true,
  },
};

export default nextConfig;
```

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/71fa4c25db2ced18.jpg)
> 來源：[@nextjs](https://x.com/nextjs/status/2084400023383736800)（回覆）｜使用 React 與 TypeScript 編寫的 `OfflineBanner` 元件程式碼，透過 `next/offline` 模組的 `useOffline` 檢查斷線狀態並在離線時顯示提示訊息。
升級指令如下：
```bash
npm install next@latest
```

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/454ff1dd0ba55202.png)
> Next.js 16.3 版本標誌畫面

這些實驗功能仍在演進，需依專案情境與官方文件人工評估後採用。

## 媒體內容

**Next.js 在編譯 50 個路由後，vercel.com (dashboard) 的記憶體用量減少約 90% 至 2 GB，nextjs.org 減少約 82% 至 840 MB**

**數據表**

|   | Before | After | 縮減 |
| --- | --- | --- | --- |
| vercel.com (dashboard) | 21.5 GB | 2 GB | ~90% smaller |
| nextjs.org | 4,600 MB | 840 MB | ~82% smaller |

**Turbopack 啟用快取後可大幅縮短 `next build` 編譯時間，其中 vercel.com/geist 專案建置速度最高約為原本 5.5 倍（30 秒降至 5.5 秒）**

**數據表**

|   | Cold | Cached | Speedup |
| --- | --- | --- | --- |
| nextjs.org | 21s | 9.2s | ~2.3x faster |
| vercel.com/home | 66s | 46s | ~1.4x faster |
| vercel.com/geist | 30s | 5.5s | ~5.5x faster |

**Node.js streams 在 Next.js App Router 伺服器端渲染中比原本的 Web streams 多處理約 22% 的負載請求**

**數據表**

| 項目 | 數值 |
| --- | --- |
| Web streams | baseline |
| Node.js streams | +22% |

## 標籤

框架更新, Next, Web, Vercel
