I have a problem with file paths.
Gulp task:
gulp.task("css", function () {
let src = ["bower_components/bootswatch/united/bootstrap.css"];
let options = { keepStructure: true, relative: true, assetsPath: "assets" };
gulp.src(src)
.pipe(postcss([assetsRebase(options)], { to: "public/build/all.css" }))
.pipe(concatCss("all.css"))
.pipe(gulp.dest("public/build"));
});
At the entrance to the file:
bower_components/bootswatch/united/bootstrap.css:
@font-face {
src: url('../fonts/glyphicons-halflings-regular.eot');
}
The output is a file with an error (wrong path):
public/build/all.css:
@font-face {
src: url("../../bootswatch/united/assets/bower_components/bootswatch/fonts/glyphicons-halflings-regular.eot");
}
And here I should get the file:
@font-face {
src: url("assets/bower_components/bootswatch/fonts/glyphicons-halflings-regular.eot");
}
How do I configure a task so that the path to the font correctly calculated?
I have a problem with file paths.
Gulp task:
At the entrance to the file:
bower_components/bootswatch/united/bootstrap.css:
The output is a file with an error (wrong path):
public/build/all.css:
And here I should get the file:
How do I configure a task so that the path to the font correctly calculated?