Answer the question
In order to leave comments, you need to log in
How to make gulp-html-minifier friends with non-standard tags?
Good afternoon, I use the Freemarker template engine, the syntax is this:
gulp-html-minifier: https://www.npmjs.com/package/gulp-html-minifier
Accordingly, when called:<#if 0 gt class.postId>ОК.</#if>
var gulp = require('gulp'),
minifyHTML = require('gulp-html-minifier'),
concat = require('gulp-concat');
gulp.task('minify-html', function () {
return gulp.src('./templates/html/*')
.pipe(minifyHTML({collapseWhitespace: true}))
.pipe(gulp.dest('./templates/html_build/'));
});
/usr/lib/node_modules/gulp-html-minifier/node_modules/event-stream/node_modules/map-stream/index.js:103
throw err
^
Error: Parse Error: <#if 0 gt class.postId>
Answer the question
In order to leave comments, you need to log in
Nothing is clear. html-minifer works with html, freemarker must be in *.ftl files. Judging by the error, you give .ftl to minify immediately, without distilling it into html.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question