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
babili is removing function arguments in scope of eval call #366
Comments
I'm surprised this didn't break our eval tests. |
Oh, we only test for mangling, not argument removal — https://github.com/babel/babili/blob/b8bac37d02c471e2c0f7a845b8afce572870092c/packages/babel-plugin-minify-mangle-names/__tests__/mangle-names-test.js#L493 🙈 |
I still get the same output with babili 0.0.11 which includes #371. Do I need to set an option? |
Unless I'm mistaken, can this be reopen, please? |
Oh. Yeah. I'll check this. |
Hello. Can you please open again? The issue is back in latest babili version (example). |
The eval error is back: babel/minify#366
Interesting. I tried it with the master branch which was released a few days ago and this bug is not present. The repl is outdated I suppose - I'll check that. |
It looks like the REPL is running Babili |
I checked with the latest release on my app. Maybe this testcase is too simple now. I will check again. |
@boopathi here is the result I get with $ cat test.js
'use strict';
function myEval(code, _var_) {
eval(code);
}
myEval('console.log(_var_)', 'myValue');
$ babel test.js --presets babili
'use strict';function myEval(a,b){eval(a)}myEval('console.log(_var_)','myValue'); |
The following code:
Is transformed to:
Which does not work.
I'm using
babel-preset-babili
v0.0.9. The bug was not present in v0.0.5. I suppose it was introduced in 10b114f.The text was updated successfully, but these errors were encountered: