Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

107
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda