-
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 when transforming optional chaining with define
#3551
Comments
It looks like esbuild/internal/js_ast/js_ast.go Lines 583 to 585 in b76b54f
I tested with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Esbuild panics when transforming
globalThis.process?.env.something
with{ define: { "globalThis.process.env": "{}" } }
and this seems to be the cause of the issue on Vite vitejs/vite#15367.Here is a playground link for a minimal repro:
I'm not sure what's the expected behavior (whether replace it or not since they don't exactly match syntactically), but I suppose panic is not expected to happen regardless.
The text was updated successfully, but these errors were encountered: