Closed konclave closed 8 years ago
Please use another plugin for this. gulp-replace:
var usemin = require('gulp-usemin');
var replace = require('gulp-replace');
gulp.task('usemin', function(){
return gulp.src('./*.html')
.pipe(replace('?{{REVISION}}', ''))
.pipe(usemin({}))
.pipe(gulp.dest('build/'));
});
In build block I've got source files paths that don't match real files. I.e. with added revision in a template.
In that case gulp-usemin doesn't find source files and fails. pathTransform option is a function that transforms source file string to make it match the real path. It doesn't transform destination file path.