Useful or not, from you.
replace-in-file How to use it with Gulp?

I want to replace all lines 'img/sprite.png' with on strings '../img/sprite.png' The lines are in the file (style.min.css) I am doing something wrong... I have errors, please help me


function fixSprites() {
    const results = replace.sync({
        files: + '/style.min.css',
        from: 'img/sprite.png',
        to: '../img/sprite.png',
        countMatches: true,
    return src( + '/style.min.css')

exports.fixSprites = fixSprites()
That's a useful answer
Without any help

Это автономный модуль Node, я не думаю, что вы можете просто так использовать его в Gulp. Вместо этого вам нужно обернуть его вспомогательной функцией следующим образом:

module.exports = function updateRedirects(done) {
    files: path.join(build.DEST_ASSETS, '_redirects'),
    from: /%API_BASE_URL%/g,
    to: config.api.baseUrl,
  }, done);

А затем используйте его в Gulp, например, с помощью gulp.seriesилиgulp.parallel

Tell me can I do this with any node.js plugin? I've tried doing something similar with other node.js plugins but it didn't work. What might it depend on? What do I need to know to adopt any other node.js plugin for gulp? I am asking you because I believe you are an expert in this area.