[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] 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.
Describe the bug
This is working in v5, but broken in v6.
Reproduction
https://stackblitz.com/edit/stackblitz-starters-prwdrf?file=index.js
Steps to reproduce
No response
System Info
Used Package Manager
npm
Logs
No response
Validations