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'));
});
认证高级PHP讲师
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
{ext: '.html'}
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