PHP breaks grunt build (htmlmin)

gruntjs, yeoman

Solution

The grunt-contrib-html task should only be run on vanilla HTML.

Though feel free to open a ticket on html-minifier for PHP tag support.

Problem

Using php code breaks the grunt build script of a yeoman generated project. Specifically the htmlmin task breaks. Is there a way to get this to work? A workaround I recently used was commenting out and later uncommenting php blocks.

Original source