-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Labels
feat: ssrp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release
Description
Describe the bug
After updating to [email protected], 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 global Object constructor and causes the following error:
export default function Object() {}TypeError: Object.defineProperty is not a function
at eval (/home/projects/vitejs-vite-b63hinxr/src/lib.js:5:8)
at ESModulesEvaluator.runInlinedModule (file:///home/projects/vitejs-vite-b63hinxr/node_modules/vite/dist/node/module-runner.js:1078:6)
at ModuleRunner.directRequest (file:///home/projects/vitejs-vite-b63hinxr/node_modules/vite/dist/node/module-runner.js:1292:82)
at ModuleRunner.cachedRequest (file:///home/projects/vitejs-vite-b63hinxr/node_modules/vite/dist/node/module-runner.js:1187:28)
at request (file:///home/projects/vitejs-vite-b63hinxr/node_modules/vite/dist/node/module-runner.js:1236:79)
at async eval (/home/projects/vitejs-vite-b63hinxr/src/main.js:3:44)
at async ESModulesEvaluator.runInlinedModule (file:///home/projects/vitejs-vite-b63hinxr/node_modules/vite/dist/node/module-runner.js:1070:5)
at async ModuleRunner.directRequest (file:///home/projects/vitejs-vite-b63hinxr/node_modules/vite/dist/node/module-runner.js:1292:61)
at async ModuleRunner.cachedRequest (file:///home/projects/vitejs-vite-b63hinxr/node_modules/vite/dist/node/module-runner.js:1188:76)
at async ModuleRunner.import (file:///home/projects/vitejs-vite-b63hinxr/node_modules/vite/dist/node/module-runner.js:1125:12)
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.3Used Package Manager
pnpm
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.
shyakadavis
Metadata
Metadata
Assignees
Labels
feat: ssrp3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release