当我在我的项目中运行grunt uglify时,我总是在控制台中收到这样的警告:
WARN: Dropping unused function o [js/shadowbox.js:8,9661]
WARN: Dropping unused function argument aW [js/shadowbox.js:17,5440]
File "js/bundle/front.bundle.js" created.
我的uglify选项如下(compress为true):
options: {
beautify: false,
compress: true,
warnings: false
},
有没有办法抑制这些警告?
答案 0 :(得分:1)
使用此:
options: {
compress: {
warnings: false
}
}
而不是:
options: {
compress: true
}