-
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
Function#name check in the runtime breaks when minified #156
Comments
Thanks for bringing this up again (previously: #48, #55, #61, #63, #112, 49358bc). The check exists to make sure Edit: I regret the tone of the following sentence, and would like to delete it, but it feels dishonest to hide my tracks like that. Please disregard.
|
I definitely should have looped you in there; I don't like the idea of 6to5 maintaining its own runtime. It would be totally redundant. I was under some pressure just to get something working at that point. The problem is that you can't use uglify at all right now, see mishoo/UglifyJS#552. It's totally Uglify's fault because it strips the names of function expressions and there's no way to turn that off, which is stupid. If you change the code to be: function GeneratorFunction() {};
function GeneratorFunctionPrototype() {};
var GF = GeneratorFunction;
var GFp = GeneratorFunctionPrototype; instead, then we can get it to work by adding Sometimes I hate computers. |
Regenerator runtime breaks when code is minified with UglifyJS that removes the function name
GeneratorFunction
, because the code checks for theFunction#name
and throws if it does not match:Similar issue (babel/babel#283) in 6to5 that uses regenerator runtime was fixed by removing the check: babel/babel@c92fd6f
The text was updated successfully, but these errors were encountered: