Encountering an issue with the npm library for HTML minify. I have downloaded and declared a library
import htmlmin from 'html-minifier';
However, when attempting to run a gulp task
export const html = () => {
return gulp.src("source/*.html")
.pipe(htmlmin({ collapseWhitespace: true }))
.pipe(gulp.dest("build"));
}
An error is being returned:
TypeError: htmlmin is not a function
Confident that there are no syntax errors, but unsure about the root cause of the problem.
Experimented with different libraries and older versions of node.js, yet the same problem persists.