【发布时间】:2017-06-30 11:08:28
【问题描述】:
我有一个 AngularJS 应用程序,我在其中使用 jspdf 库。当我使用grunt serve 运行开发版时,一切都很好。但是如果我使用 grunt build 构建应用程序,使用 uglify,缩小版本会出现以下错误:
jsPDF PubSub Error Cannot read property 'annotations' of undefined TypeError: Cannot read property 'annotations' of undefined
jsPDF PubSub Error Cannot set property 'pdf' of undefined TypeError: Cannot set property 'pdf' of undefined
"grunt-contrib-uglify": "0.11.1"
我找到了对应的GitHub issue,但是没有用。
【问题讨论】:
-
检查是否有像
//这样的 cmets,如果他们被内联,他们会注释掉整个块
标签: javascript gruntjs jspdf uglifyjs grunt-contrib-uglify