HTMLMin / Laravel-HTMLMin

A simple HTML minifier for Laravel 5, 6, 7, 8 & 9.
MIT License
1.02k stars 119 forks source link

Ignore in htmlmin.php not working on Laravel 5.8 #135

Open JvManuel opened 5 years ago

JvManuel commented 5 years ago

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' ]

bramburn commented 5 years ago

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

rossbearman commented 5 years ago

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?

nafplann commented 5 years ago

Hi.. is this fixed yet?