Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

110
Visualizações
Pictures not showing in gulp build

I have a gulp build, everything works fine, but after the build, some images are not loaded and are not displayed because the paths are different, for this I installed gulp-replace. The paths have been successfully replaced, this can be seen in the final code. But the image is not showing on the page.

And every time when I start the assembly, the picture that was missing may appear in the new assembly, but another one will be missing

What's wrong with my build?

Link to my gulp code

enter image description here enter image description here enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The problem was in const cleanCSS = require("gulp-clean-css");

As I did not try to rearrange the line with renaming, nothing happened. In the minified file, the paths remain from the src parp. Temporarily removed minification

//Таск для обработки стилей
gulp.task("styles", () => {
 
  return (
    gulp
      .src(styleFiles)
      .pipe(sourcemaps.init())
    
      .pipe(less())

      .pipe(concat("style.css"))
      .pipe(replace('url("../img/', 'url("./../img/'))
     
      .pipe(
        autoprefixer({
          overrideBrowserslist: ["last 2 versions"],
          cascade: false,
        })
      )

      .pipe(sourcemaps.write("./"))
      .pipe(gulp.dest("./build/css"))
      .pipe(browserSync.stream())
  );
});

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda