Gulp.js - Rewrite urls embedded in css while concatenating

前端 未结 2 2062
青春惊慌失措
青春惊慌失措 2021-02-19 11:46

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 re

2条回答
  •  粉色の甜心
    2021-02-19 12:13

    You can use gulp-replace. https://npmjs.org/package/gulp-replace

    **gulp-replace can be called with a string or regex.**
    
    *replace(string, replacement)*
    
    string
    
    Type: String
    
    The string to search for replacement
    
    Type: String
    
    The replacement string.
    
    *replace(regex, replace)*
    
    Note: gulp-replace cannot perform regex replacement on streams.
    
    regex
    
    Type: RegExp
    

    You could also use gulp-frep

提交回复
热议问题