Skip to content

fix: Include renderBuiltUrl contents in JS + CSS chunk hashes#21433

Draft
hartz89 wants to merge 2 commits intovitejs:mainfrom
hartz89:render-built-url-fix-hashing
Draft

fix: Include renderBuiltUrl contents in JS + CSS chunk hashes#21433
hartz89 wants to merge 2 commits intovitejs:mainfrom
hartz89:render-built-url-fix-hashing

Conversation

@hartz89
Copy link

@hartz89 hartz89 commented Jan 16, 2026

Fixes #13996 by including renderBuiltUrl contents in JS chunk hashes by adding an augmentChunkHash hook to the vite:build-import-analysis plugin that includes the stringified representation of the renderBuiltUrl function in the hash calculation.

It also solves the same issue for CSS chunk hashes by salting the CSS source with the renderBuiltUrl configuration before it gets emitted.

This is my first Vite PR so I'm sure I'm missing some components, but I'll continue to iterate on it as I gather immediate feedback on the approach.

@hartz89 hartz89 changed the title fix: Include renderBuiltUrl contents in JS chunk hashes fix: Include renderBuiltUrl contents in JS + CSS chunk hashes Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chunk hash did not change when I only update experimental.renderBuiltUrl function.

2 participants