-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Deep nesting resulting in stray undefined in output #17775
Copy link
Copy link
Closed
Description
💻
- Would you like to work on a fix?
How are you using Babel?
babel-loader (webpack)
Input code
Configuration file name
No response
Configuration
REPL defaults
Current and expected behavior
Current behavior: properties (and some other things like closing braces of functions) nested more than 32 levels deep is prefixed with an unexpected undefined.
Expected behavior (same as v7.28.6): no stray undefined is inserted.
Environment
- Babel version: v7.29.0
Possible solution
No response
Additional context
One might consider 32+ levels of nesting to be excessive, but the issue originally occurred with babel processing the output of other webpack loaders (specifically vue-loader), so the input is not intentionally nested. The REPL example is the most stripped-down failure case I could reproduce.
The issue appears to be related to @babel/generator - pinning it to 7.28.6 fixed the issue as a temporary workaround.
Reactions are currently unavailable