-
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
Error: SyntaxError: Unexpected token operator «*», #1199
Comments
There is no complete support for import statements yet in uglifyjs on harmony until there are patches to implement it properly. |
ES6 features are only available on the harmony branch. #448 is for harmony support. |
@avdg I understand that there is no support for import statements. And I am not using them anyway. It's all cjs. The build error isn't caused by an import statement. It's caused by a generator function. @rvanvelzen I got it, thanks. |
@mkastner Feel free to submit a test case |
@avdg I apologize for not being able to submit a test case. However the error can also be reproduced here: http://lisperator.net/uglifyjs/#demo by entering:
It comes up with:
|
Uh... I won't test harmony on that site... I would rather checkout the harmony branch. The code on lisperator doesn't even match v2.7.0 code when I checked lastly. |
Did you get anywhere on this? I'm seeing the same thing. Is there a way to exclude a file from uglify? |
unnamed function and not assigned. Fixing either one should fix it. |
Also, drop the code in the console in a browser, I don't think your example was valid anyway. |
Edit: woops, placed the * wrong in the last example, fixed the url now. |
Normally all files should be inputted 1 by 1, but linux seems to support expansion before uglify notices it. The solution would be to not make that file list in that pattern (or keep it out of the list if it's not listed by the pattern), but I'm not sure if that will work for you. |
@avdg |
No worries |
Hi,
it seems like I can't get my code compressed due to generator functions. I don't know, why. Should I rather use the harmony branch for ES6 functionality?
The text was updated successfully, but these errors were encountered: