HTMLMin / Laravel-HTMLMin

A simple HTML minifier for Laravel 5, 6, 7, 8 & 9.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ignore in htmlmin.php not working on Laravel 5.8

JvManuel opened this issue · comments

commented

I tried to Install Htmlmin in Laravel 5.8 and I tried to skip minification on my backend folder of the application but it is not working. I want to skip the minification on my backend folder because it has a conflict on the @Permission of Laravel.

"htmlmin.php"
'ignore' => [
'resources/views/backend'
]

Just add <!-- skip.minification --> to the files you want to ignore for now.

After upgrading to Laravel 5.8 from 5.7, neither the ignore configuration option or the <!-- skip.minification --> comment are working.

Previously minificaton was working for @permission without needing to ignore any of the files. I tried switching from Blade::directive to Blade::if without luck and also using a different name for the directive.

Replacing the Blade::directive() and Blade::if() calls, with a call to directive() through $this->app['htmlmin.compiler'] fixes this, but this doesn't seem to support if() directives and it seems a bit hacky.

Any ideas on an approach that could solve this properly?

Hi.. is this fixed yet?