Vite SSR doesn't fail when same name is declared via import #19617
Labels
feat: ssr
p2-edge-case
Bug, but has workaround or limited in scope (priority)
regression
The issue only appears after a new release
Describe the bug
Example code
test.js
On Node:
On Vite SSR:
I noticed this when testing oxc module runner transform in vitejs#85 where oxc rejected such code but current ssr tolerate the same code.
Reproduction
https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/vite-ssr-import-name-already-declared?file=src%2Ftest.js
Steps to reproduce
Open stackblitz and run
node repro.js
andnode src/test.js
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.20.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: vite: ^6.2.0 => 6.2.1
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: