next.js
fae4e1dd - Prepare `'use cache'` for static root-param tracking (#99239)

Commit
6 days ago
Prepare `'use cache'` for static root-param tracking (#99239) Static root-param tracking for `'use cache'` needs to distinguish which getters a cached module imports. The existing generated module contains every getter, so module-level dependency collection includes unrelated root params. `next/root-params` now re-exports each getter from a separate virtual module. The generated `next/root-params` module declares that it has no side effects, so Turbopack resolves named imports without including unrelated getter modules. Runtime root-param tracking remains unchanged. The split also keeps code hashes stable when unrelated root params are added. The regression test checks this dependency isolation through the existing code-hash manifest.
Author
Parents
Loading