Multiple html files are executed gulp-useref cannot be referenced normally

  node.js, question

Just now, when I was doing the gulp-usere task, it appeared that not all js/css in html files can be correctly merged and applied. The test project was very simple. I wanted to merge and compress css/js of html inside in app directory into dest directory, and then the following results appeared:


The following are the activity.html and activityList.html in the dest directory (still the same as in app, no change); It can be seen that activity.html can be correctly quoted, while activityList.html has just been copied, and so is another html file.



Only js/css in the activity.html file was normally compressed and referenced, while js/css in inside, the other two files, was normally compressed and merged without reference.

The task code is as follows:

 return gulp.src('app/MoxiWap/*.html')

I don’t know what the problem is.

According to the path of the landlord wrote it again-
The first is the two HTML in the DEV folder inside. The second HTML has exactly the same comments as the original owner’s

However compile (my task name is HTML)
Gulp’s mission is as follows:

gulp.task('html', function() {
 return gulp
 .pipe(gulpif('*.js', uglify()))
 .pipe(gulpif('*.css', minifyCss()))

After compilation, a new folder dist (publishing environment) is generated.
The MoxiWap folder and CSS/JS can be seen inside.
And the two HTML copies correctly replaced the reference

According to the file provided by the landlord, I tested it-there is no problem, I will pack it and send it to you.

1. If this file I sent to you can run normally, then there is a problem with your node_modolue dependency.
2. If this is not the case. . That’s about computers-
Baidu Netdisk:

The landlord himself deletes the dest folder in the outermost folder and then runs the gulp command-