Turbopack FileSystem Caching
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 Beta and is still under development. Users adopting should expect some stability issues. We recommend first adopting it for development.
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 nextConfig
Version Changes
Version | Changes |
---|---|
v16.0.0 | Beta release with separate flags for build and dev |
v15.5.0 | Persistent caching released as experimental on canary releases |
Was this helpful?