简体   繁体   English

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

[英]Semantic UI - `gulp build` returns JS error

I installed the latest version of Semantic-UI but when building the assets with gulp build , compiling JS returns the errors below, while CSS is compiled just fine. 我安装了最新版本的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

I have never come across this issue before in my previous projects with Semantic UI so I'm not sure what is causing this. 我以前在使用语义UI的项目中从未遇到过此问题,因此我不确定是什么原因造成的。 Can anybody suggest the fix? 有人可以建议解决办法吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM