jubbot
#1
I am trying to find a way to minify my main css file without using plugin. But tried this method
<link rel="stylesheet" href="{{ ['assets/less/theme.less']|theme| minify }}" media="all">
The code above does not work and wondering what’s the best method to minify the css files?
Alex
#2
You can set this in 2 places:
- config/cms.php → change this property ‘enable_asset_minify’ => env(‘CMS_ASSET_MINIFY’, true)
- .env → add or change “CMS_ASSET_MINIFY=true”
1 Like
jubbot
#3
Thank you for the detailed solution