Reproduce vite-ssr-switch-case-scope from its authentic engineer request.
Reproduce vite-ssr-switch-case-scope from its authentic engineer request.: a task in vite-selfbench (Harbor dataset). Fix SSR import rewriting around JavaScript switch statements. When a case declares a binding directly in its body with the same name as an import, that declaration must obey module…
The task
Fix SSR import rewriting around JavaScript `switch` statements. When a case declares a binding directly in its body with the same name as an import, that declaration must obey module lexical scoping rather than making the import appear shadowed across the enclosing function.
Part of dari-ai/vite-selfbench.