A Laravel Mix extension that minifies Blade or other template files using HTMLMinifier. Current stable version is 2.0.1, released in 2020, with no recent updates. It wraps html-minifier and integrates into Laravel Mix's build pipeline via mix.minTemplate(). Unlike generic minifiers, it is specifically designed for Laravel's storage/framework/views directory and automatically applies only in production. Note: requires Laravel Mix and Node.js, and is unmaintained since 2020.
npm install laravel-mix-views-minifierNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs the package, attaches minTemplate to mix, and minifies all compiled Blade templates in production with custom HTMLMinifier options.
Consider using laravel-mix-template-minifier or a custom webpack plugin for newer Mix versions.
Run: npm install --save-dev html-minifier
Update usage to pass options as third argument if needed.
Check Mix version; for Mix 6, use an alternative or fork the package.
Run: npm install --save-dev laravel-mix-views-minifier
Add mix.minTemplate = require('laravel-mix-views-minifier'); before using mix.minTemplate().Run: npm install --save-dev html-minifier