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.