使用口香糖胶化/最小化聚合物纤维网组件 [英] Uglify/minify Polymer web components using gulp

查看:89
本文介绍了使用口香糖胶化/最小化聚合物纤维网组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用gulp的uglify插件来缩小我的Web组件,但失败了,因为它无法识别自定义html标签.

I am trying to minify my web components using gulp's uglify plugin but it fails because it does not recognize the custom html tags.

有没有可以减少包含自定义标签的html的gulp插件?

Are there any gulp plugins that can minify html containing custom tags?

推荐答案

要做到这一点是非常困难的.您可以使用 crisper 插件将脚本分解为自己的文件.然后,您可以缩小脚本源.然后使用 vulcanize 将脚本内联回HTML.

To do this is quite the challenge. You use the crisper plugin to factor out the script into it's own file. You can then minify the script source. Afterwards use vulcanize to inline your script back into the HTML.

这篇关于使用口香糖胶化/最小化聚合物纤维网组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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