Open
Description
Describe the bug
href attribute in html that contains #% fails during build, this worked previously in 5.4.2 (not since)
Reproduction
https://stackblitz.com/edit/vitejs-vite-xtansfhc?file=index.html&terminal=dev
Steps to reproduce
run vite build
System Info
System:
OS: macOS 15.1
CPU: (10) arm64 Apple M4
Memory: 1.89 GB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 23.6.0 - /opt/homebrew/bin/node
npm: 11.0.0 - /opt/homebrew/bin/npm
Browsers:
Chrome: 131.0.6778.265
Safari: 18.1
npmPackages:
vite: ^6.0.7 => 6.0.7
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.