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
Issue applying babel-plugin-transform-remove-undefined in babel7-beta.40 #803
Comments
Fix: babel#803 Altough not sure if the root cause is on babel.
Some more digging: it seems that the issue on remove-undefined is a side-effect from when also enabling A trivial workaround is to add a guard for FYI, for more accurate testing I updated all dependencies to babel40 |
Also I believe the constant-folding is why the CI is failing. Its all related with scope property being undefined. |
I kinda drilled it down to simplify. So, maybe both the transforms are. In some places of babel-minify, we avoid the babel's re-queueing ( Also, interestingly, the mangle's re-queueing had to be turned off for babel-minify to work with babel-7 - c0c712d#diff-18ba673c600d34ebd7daef11f67829f9R438 |
This is merged to master. Thanks for the fix @diervo . |
Input Code
Actual Output
Expected Output
Details
I trace it down to the following code in
babel-plugin-transform-remove-undefined
:When visiting
VariableDeclaration
node, and accessing the path for its propertyinit
, that path should have a scope pointing to the parent function declaration. Instead scope is null.Not sure if is a bug in babel.
The text was updated successfully, but these errors were encountered: