Minify Files for Production
With the lila-minify
command you can minify your js and css files
located in the public/js
and public/css
folders.
lila-minify
With the lila-minify
command you can minify your js and css files
located in the public/js
and public/css
folders.
lila-minify
For maximum Lighthouse scores and zero-CPU overhead in production, use the lila-optimize
command.
Unlike lila-minify which overwrites files, lila-optimize acts as an Ahead-of-Time
asset builder:
.png, .jpg, and .jpeg to
.webp using Pillow (quality 80%)..min.css and .min.js files without
destroying your original source code.app/assets_manifest.json dictionary.
lila-optimize
When DEBUG=False, Lila automatically loads the manifest into RAM. The
{{ '{{' }} public('img/logo.png') {{ '}}' }} Jinja helper performs a fast dictionary lookup. If a
.webp or .min.js version exists in the manifest, it will automatically serve it
instead of the original file, saving you from rewriting your HTML!