Gulp.js

编程入门 行业动态 更新时间:2024-10-15 12:36:58
本文介绍了Gulp.js - 在连接时重写嵌入在css中的网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用Gulp连接来自不同目录(Bower管理的依赖)的几个css文件。 Font-awesome是这些依赖项之一,它包含对其字体的相对引用 url(../ font ....)。当css文件被连接并放置在不同的目录中时,这个相对URL显然是错误的。有没有最好的做法来处理这个?

I'm using Gulp to concatenate several css files from different directories (Bower managed dependencies). Font-awesome is one of these dependencies and it contains a relative reference to its fonts url(../font....). When the css file is concatenated and placed in a different directory this relative url will obviously be wrong. Is there a best practice for dealing with this?

推荐答案

另一个选项是gulp-css-rebase-urls,用于解决这个问题。

Another option is gulp-css-rebase-urls which was built to address this problem.

www.npmjs/package / gulp-css-rebase-urls

更多推荐

Gulp.js

本文发布于:2023-11-02 00:17:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550820.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Gulp   js

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!