-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: Expected scope, found scope while parsing #4088
Comments
Huh, that's some crazy code. Here's the code for ease of access:
I'm guessing this is related to some unintentional scope manipulation in the new Edit: Here's a minimal reproduction: switch (0) {
case 1: x = function() {}
case function() {}: break
} Perhaps related to function expressions inside case statements, which isn't something I've ever seen real code do. |
After updating to Vite version 6.2.0, which includes an upgrade to esbuild version 0.25.0, I encountered the following error during the build process:
Environment:
The error appears to be related to a switch-case statement within the router.ts file. Here's the relevant portion of the code:
I've been using similar code for several years, and such constructs are common in my codebase. For those seeking a quick temporary solution to this issue, downgrading Vite to version 6.1.x may help, as it uses an earlier version of esbuild.
|
While updating to esbuild v0.25.0, we noticed that some inputs cause esbuild to panic. I've tried my best to minify the input JS, but it's still a rather large reproducer.
Input:
min_js.zip
Steps:
Version: 0.25.0
The text was updated successfully, but these errors were encountered: