Live binding does not work when the Object
constructor is shadowed
#19993
Labels
feat: ssr
p3-minor-bug
An edge case that only affects very specific usage (priority)
regression
The issue only appears after a new release
Describe the bug
After updating to
vite@6.3.3
, SSR in my app stopped working.I discovered that the issue was introduced in this commit: 80a91ff
lib.js
contains the following code, which shadows the globalObject
constructor and causes the following error:Reproduction
https://stackblitz.com/edit/vitejs-vite-cpvgnuhv?file=src%2Flib.js
Steps to reproduce
open stackblitz
System Info
System: OS: Linux 6.6 cpe:/o:nixos:nixos:24.11 24.11 (Vicuna) CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz Memory: 3.82 GB / 15.56 GB Container: Yes Shell: 5.2.37 - /run/current-system/sw/bin/bash Binaries: Node: 23.9.0 - /nix/store/wwdh9slw3km4a1cpwacanciinz742wxa-nodejs-23.9.0/bin/node npm: 10.9.2 - /nix/store/wwdh9slw3km4a1cpwacanciinz742wxa-nodejs-23.9.0/bin/npm pnpm: 10.1.0 - /nix/store/7v3vl4fgjqswj50zm8na25bnxqgli7sn-pnpm-10.6.2/bin/pnpm Browsers: Brave Browser: 135.1.77.101 npmPackages: vite: catalog: => 6.3.3
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: