fix: preserve logical HTML entry paths for symlinks (fix #23585) - #23589
Open
charan-rathore wants to merge 4 commits into
Open
charan-rathore wants to merge 4 commits into
charan-rathore wants to merge 4 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an HTML entry inside the project root is a symlink to a file outside it, the build resolves to the real file's location and computes the emitted output path from there. That path points outside the build directory, so the build fails. This change records each configured HTML input's logical path at build start and uses it for the emitted filename and asset URLs, so the output lands where the configured entry says it should. Adds regression tests for symlinked index.html, nested and duplicate-basename entries, relative inputs, and a symlinked project root. Fixes #23585.
Reproduction: https://github.com/u9g/vite-symlinked-entry-repro
Patch drafted with AI assistance (Grok 4.7); reviewed, tested and verified locally - build, full build test suite (72/72), typecheck, lint and formatting all pass.