Why do I still export .ejs like this
gulp.task('ejs', function() {
gulp.src('html/index.ejs')
.pipe(ejs({},{ext: '.html'}))
.pipe(gulp.dest('./dist'));
});
怪我咯2017-06-28 09:28:27
gulp.task('ejs', function() {
gulp.src('html/index.ejs')
.pipe(ejs({},{},{ext: '.html'}))
.pipe(gulp.dest('./dist'));
});
ejs(data, options, settings)
Look at the official website, the second parameter is options, and the third parameter is settings. What you wrote above is assigning {ext: '.html'}
to options.
Official website address