в PhpStorm нет встроенной автоматической минимизации HTML файла, но ее несложно добавить.
npm install html-minifier -g
- в Settings | Tools | File Watchers, добавьте новый file watcher, используя custom шаблон
- в поле Program, укажите полный путь к html-minifier
- в поле Arguments, добавьте след. аргументы:
$FileName$ --collapse-boolean-attributes --collapse-whitespace --html5 --remove-attribute-quotes --remove-comments --remove-empty-attributes --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-style-link-type-attributes --remove-tag-whitespace --sort-attributes --sort-class-name --trim-custom-fragments --use-short-doctype --minify-js -o $FileNameWithoutExtension$.min.html
в поле Output paths to refresh, укажите $FileNameWithoutExtension$.min.html
Working directory: $FileDir$

Полный список опций html-notifier доступен по команде html-minifier --help
. См. https://github.com/kangax/html-minifier