语义UI - `gulp build`返回JS错误

时间:2017-07-28 02:52:38

标签: javascript jquery gulp semantic-ui

我安装了最新版本的Semantic-UI,但在使用gulp build构建资产时,编译JS会返回以下错误,而CSS编译得很好。

Building assets
[10:48:00] Created: dist/components/site.js
[10:48:00] Plumber found unhandled error:
 GulpUglifyError: unable to minify JavaScript
Caused by: DefaultsError: `preserveComments` is not a supported option
File: /home/forge/mysite.co/public/semantic/dist/components/site.js
[10:48:00] Created: dist/components/form.js
[10:48:00] Plumber found unhandled error:
 GulpUglifyError: unable to minify JavaScript
Caused by: DefaultsError: `preserveComments` is not a supported option
File: /home/forge/mysite.co/public/semantic/dist/components/form.js
[10:48:00] Created: dist/components/accordion.js
[10:48:00] Plumber found unhandled error:
 GulpUglifyError: unable to minify JavaScript
Caused by: DefaultsError: `preserveComments` is not a supported option
File: /home/forge/mysite.co/public/semantic/dist/components/accordion.js
[10:48:00] Created: dist/components/checkbox.js
[10:48:00] Plumber found unhandled error:
 GulpUglifyError: unable to minify JavaScript
Caused by: DefaultsError: `preserveComments` is not a supported option
File: /home/forge/mysite.co/public/semantic/dist/components/checkbox.js
[10:48:00] Created: dist/components/dimmer.js
[10:48:00] Plumber found unhandled error:
 GulpUglifyError: unable to minify JavaScript
Caused by: DefaultsError: `preserveComments` is not a supported option
File: /home/forge/mysite.co/public/semantic/dist/components/dimmer.js

我之前在使用Semantic UI的项目中从未遇到过这个问题,所以我不确定是什么导致了这个问题。任何人都可以提出修复建议吗?

1 个答案:

答案 0 :(得分:0)

此错误已得到修复。见这里:

https://github.com/Semantic-Org/Semantic-UI/issues/5391