HTMLMin / Laravel-HTMLMin

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

Minification does not work :( #177

Open Ahtnezev opened 1 year ago

Ahtnezev commented 1 year ago

Laravel Framework 9.52.4 PHP 8.1.18 Composer version 2.3.7 2022-06-06 Livewire 2.x

Hi, I have a problem when viewing the minified blade files, I don't know if it's 'cause I'm using Livewire? thanks already tried with view:clear command and config:clear and force => true

core45 commented 10 months ago

The same here. I've installed the package and follow every step and this package does totally NOTHING. Nothing like view:clear or set "force" to true doesn't help.

Laravel 9.52.15 PHP 8.1.23

jvitasek commented 7 months ago

The same here. I've installed the package and follow every step and this package does totally NOTHING. Nothing like view:clear or set "force" to true doesn't help.

Laravel 9.52.15 PHP 8.1.23

did you add the middleware to the routes? that actually does the HTML minification

renaudberthier commented 4 months ago

Found it, you need to modify app/Http/Kernel.php file to make it work:

protected $middleware = [
    ...
    \HTMLMin\HTMLMin\Http\Middleware\MinifyMiddleware::class
];

Documentation: https://laravel.com/docs/10.x/middleware Can someone update the documentation?