自耕农编译:缩小图像重命名 - > angularjs NG-SRC失败 [英] yeoman build:minify renames images -> angularjs ng-src fails

查看:167
本文介绍了自耕农编译:缩小图像重命名 - > angularjs NG-SRC失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的自耕农+棱角分明,尝试了自耕农编译:缩小。失败的原因是任务REV:IMG重命名所有图像。随后,动态源(见<一href=\"http://docs.angularjs.org/api/ng.directive:ngSrc\">http://docs.angularjs.org/api/ng.directive:ngSrc)不工作了。

I am using yeoman + angular and tried out 'yeoman build:minify'. This fails because the task rev:img renames all images. Afterwards, the dynamic sources (see http://docs.angularjs.org/api/ng.directive:ngSrc) do not work anymore.

是否有人知道一招解决这一问题?例如。这将有可能避免图像重新命名

Does someone know a trick to fix this? E.g. would it be possible to avoid the image renaming?

推荐答案

这是当前已知问题和我们会尝试尽快修复它。

This is currently a known issue and we'll try to fix it soon.

在此期间,您可以尝试在这个线程。

In the meantime you can try out one of the suggested workarounds in this thread.

只需更换配置与此:

rev: {
   img: ['images/**','!images/ignore/**']
}

和放置所有的动态图像图像/忽略/

and place all your dynamic images in images/ignore/

这篇关于自耕农编译:缩小图像重命名 - &GT; angularjs NG-SRC失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆