fahlisaputra / laravel-minify

Minify your blade views, html, css and obfuscate js files on the fly. Lightweight minifier for your Laravel project.
MIT License
76 stars 17 forks source link

This package doesn't work on Laravel 11 #21

Open kkamara opened 8 months ago

kkamara commented 8 months ago

I have tested with my own Laravel 11 website at https://github.com/kkamara/kelvinkamara.com The minification doesn't work on Laravel 11.

bridgeyuwa commented 2 months ago

I have the same issue, nothing works on Laravel 11.

Nothing is minified.

dariox64 commented 5 days ago

It works for me on Laravel 11, initially I only included

\Fahlisaputra\Minify\Middleware\MinifyHtml::class,

because I didn't care about css and js.

You have to include all 3, even if you don't want to use them


// Middleware to minify CSS
\Fahlisaputra\Minify\Middleware\MinifyCss::class,
// Middleware to minify Javascript
\Fahlisaputra\Minify\Middleware\MinifyJavascript::class,
// Middleware to minify Blade
\Fahlisaputra\Minify\Middleware\MinifyHtml::class,
bridgeyuwa commented 5 days ago

It works for me on Laravel 11, initially I only included

\Fahlisaputra\Minify\Middleware\MinifyHtml::class,

because I didn't care about css and js.

You have to include all 3, even if you don't want to use them


// Middleware to minify CSS
\Fahlisaputra\Minify\Middleware\MinifyCss::class,
// Middleware to minify Javascript
\Fahlisaputra\Minify\Middleware\MinifyJavascript::class,
// Middleware to minify Blade
\Fahlisaputra\Minify\Middleware\MinifyHtml::class,

Now it is only minifying the Html, CSS and JS of the entry route "/" Every other route remains unminified.

bridgeyuwa commented 5 days ago

It works for me on Laravel 11, initially I only included

\Fahlisaputra\Minify\Middleware\MinifyHtml::class,

because I didn't care about css and js.

You have to include all 3, even if you don't want to use them


// Middleware to minify CSS
\Fahlisaputra\Minify\Middleware\MinifyCss::class,
// Middleware to minify Javascript
\Fahlisaputra\Minify\Middleware\MinifyJavascript::class,
// Middleware to minify Blade
\Fahlisaputra\Minify\Middleware\MinifyHtml::class,

Now it is only minifying the html and Css of the entry route "/" Every other route remains unminified.