本页还没有译文
本页 6 段还没译成简体中文,下面显示的是英文原文。Turbopack FileSystem Caching
还没翻译译自英文(nextjs.org)本页 6 段都还没译
Usage
Turbopack FileSystem Cache enables Turbopack to reduce work across next dev or next build commands. When enabled, Turbopack will save and restore data to the .next folder between builds, which can greatly speed up subsequent builds and dev sessions.
Good to know
The FileSystem Cache feature is considered stable for development and experimental for production builds
next.config.ts
import type { NextConfig } from 'next'
const nextConfig: NextConfig = {
experimental: {
// Enable filesystem caching for `next dev`
turbopackFileSystemCacheForDev: true,
// Enable filesystem caching for `next build`
turbopackFileSystemCacheForBuild: true,
},
}
export default nextConfignext.config.js
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
// Enable filesystem caching for `next dev`
turbopackFileSystemCacheForDev: true,
// Enable filesystem caching for `next build`
turbopackFileSystemCacheForBuild: true,
},
}
module.exports = nextConfigVersion Changes
| Version | Changes |
|---|---|
v16.1.0 | FileSystem caching is enabled by default for development |
v16.0.0 | Beta release with separate flags for build and dev |
v15.5.0 | Persistent caching released as experimental on canary releases |
AI 翻译查看英文原文