Answer the question
In order to leave comments, you need to log in
I want to glue several html files into one using gulp-include, it doesn't work. How to fix?
There is just https://www.npmjs.com/package/gulp-include and there is this https://www.npmjs.com/package/gulp-file-include and I think there is more. Not sure which one to use?
Here is my task:
gulp.task('html', function() {
return gulp.src(['frontend/assets/index.html', 'frontend/assets/header.html'])
.pipe(include())
.pipe(rename('index.html'))
.pipe(gulp.dest('public'));
});
Answer the question
In order to leave comments, you need to log in
firstly, in gulp.src it is better to specify only the main index.html file into which other pieces will be connected
; secondly, it is written in the documentation that the plugin uses a directive with which it recognizes which and where file to "send"
for HTML:
judging by the fact, that you didn’t write anything about it, I think it doesn’t exist
and then everything should work
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question