Rails assets - keep license comments

谁说我不能喝 提交于 2019-12-22 04:08:32

问题


How can I prevent Uglifier from removing some comments from some files? I want to have code minified and compressed but also I want the licensing comments to remain intact.


回答1:


From the documentation of uglifyJS.

-nc or --no-copyright — by default, uglifyjs will keep the initial comment tokens in the generated code (assumed to be copyright information etc.). If you pass this it will discard it.

which is also an option of uglifier.



来源:https://stackoverflow.com/questions/8896969/rails-assets-keep-license-comments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!