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
can not preserve comments rightly #82
Comments
@ShiJinYu If you swap the order of the "origin" and "do not delete" comments, does it work? |
No, it doesn't work. String(function(){
/*! I will be deleted in any case
<div class="foo">{{bar}}</div>
*/
}) |
I'm also experiencing the same issue. I can't get any values of |
What a pity! It is really a very strange requirement what I had encountered. |
This might be a regression in how uglifyjs handles preserving comments. I'll look when I return from vacation next week. ✨
|
I'm very much obliged to you,enjoying your time. |
I have been having the same issue. I made it work by specifying the comments options manually .pipe(uglify({output: {comments: /^!|@preserve|@license|@cc_on/i}})) |
I've just confirmed the proper option is being generated and passed to UglifyJS correctly. Can you reproduce the behavior calling their binary directly? Also, I note the following from the
|
UglifyJS code is too complicated for me, I will try later but I'm not sure if I can reproduce. Thank you so much for making nothing of hardships to find out way and discuss this issue with me. Go to bed early please. :-) |
such as:
output:
Comments with a bang(!) or @preserve, @license, @cc_on,should not be deleted,as README said.
The text was updated successfully, but these errors were encountered: