This package allows you to minify template files.
$ npm install --save-dev laravel-mix-views-minifier
// webpack.mix.js
let mix = require('laravel-mix');
mix.minTemplate = require('laravel-mix-views-minifier')
if (mix.inProduction()) {
mix.minTemplate('storage/framework/views/*.php', 'storage/framework/views/')
}
// ...
- Documentation for Mix can be found on the Laravel website.
- Documentation for HTMLMinifier can be found on the HTMLMinifier website.
MIT @ sparkinzy