Upstream change
Next.js added experimental.outputHashSalt (config) and NEXT_HASH_SALT (env var) to mix a user-supplied string into content-addressed output hashes for chunks and static assets. When set, all output filenames change without modifying source code — useful for cache-busting after CDN poisoning or across deployments.
When both are set, the values are concatenated: outputHashSalt + NEXT_HASH_SALT.
Commit: vercel/next.js@3e01588
PR: vercel/next.js#91871
What changed upstream
- New
experimental.outputHashSalt option in ExperimentalConfig (validated via zod in config-schema)
- New
NEXT_HASH_SALT env var support
- Pre-computed as
NextConfigComplete.hashSalt = (experimental.outputHashSalt ?? '') + (NEXT_HASH_SALT ?? '')
- Webpack: forwarded to
output.hashSalt and to the next-image-loader (prepends salt to image content before hashing)
- Turbopack: threaded through
ProjectOptions.hashSalt into chunking contexts, uses deterministic_hash_with_salt for single-pass hashing
What vinext needs
vinext uses Vite/Rolldown for bundling, so the implementation path differs:
- Config recognition: Recognize
experimental.outputHashSalt in the vinext config layer and NEXT_HASH_SALT env var. Compute the effective salt the same way (configSalt + envSalt).
- Build output hashing: Investigate how to inject a hash salt into Vite/Rolldown's content-addressed filenames. Rolldown may support
output.hashSalt or similar — if not, a custom generateBundle hook could rename outputs.
- Static asset hashing: Images and other static assets processed by Vite's asset pipeline would also need the salt mixed in.
- Validation: If neither value is set, behavior should be identical to today (no salt, no change).
Priority
Low — this is an advanced deployment escape hatch, not a common user-facing feature. Track for config parity.
Upstream change
Next.js added
experimental.outputHashSalt(config) andNEXT_HASH_SALT(env var) to mix a user-supplied string into content-addressed output hashes for chunks and static assets. When set, all output filenames change without modifying source code — useful for cache-busting after CDN poisoning or across deployments.When both are set, the values are concatenated:
outputHashSalt + NEXT_HASH_SALT.Commit: vercel/next.js@3e01588
PR: vercel/next.js#91871
What changed upstream
experimental.outputHashSaltoption inExperimentalConfig(validated via zod in config-schema)NEXT_HASH_SALTenv var supportNextConfigComplete.hashSalt = (experimental.outputHashSalt ?? '') + (NEXT_HASH_SALT ?? '')output.hashSaltand to thenext-image-loader(prepends salt to image content before hashing)ProjectOptions.hashSaltinto chunking contexts, usesdeterministic_hash_with_saltfor single-pass hashingWhat vinext needs
vinext uses Vite/Rolldown for bundling, so the implementation path differs:
experimental.outputHashSaltin the vinext config layer andNEXT_HASH_SALTenv var. Compute the effective salt the same way (configSalt + envSalt).output.hashSaltor similar — if not, a customgenerateBundlehook could rename outputs.Priority
Low — this is an advanced deployment escape hatch, not a common user-facing feature. Track for config parity.