We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我用heredoc方式写模板,如下:
function testDoc() { /*! <div>test</div> */ }
在用uglify压缩后,变成空函数了,如下:
function testDoc() {}
即使设置参数preserveComments: "some"也不行
The text was updated successfully, but these errors were encountered:
即使设置了 preserveComments: 'some',UglifyJS 会压缩掉函数末尾的注释。很多人已经讨论过这个问题,参考这里 https://github.com/mishoo/UglifyJS2/issues/88。
preserveComments: 'some'
不过,通过在函数末尾加一行表达式(任何表达式),可以绕过这个规则。
function testDoc() { /*! <div>test</div> */ $.noop() }
Sorry, something went wrong.
No branches or pull requests
我用heredoc方式写模板,如下:
在用uglify压缩后,变成空函数了,如下:
即使设置参数preserveComments: "some"也不行
The text was updated successfully, but these errors were encountered: