Adapting javascript and CSS minify tools to Webloader.
The best way to install is using Composer:
$ composer require joseki/webloader-filters
Register minify services to your config.neon
:
services:
cssMin: Joseki\Webloader\CssMinFilter
jsMin: Joseki\Webloader\JsMinFilter
... and then you can use them inside WebLoader extension as follows:
webloader:
css:
default: # your WebLoader css control name
filters:
- @cssMin
or for javascript:
webloader:
js:
default: # your WebLoader js control name
filters:
- @jsMin
NOTE: when using as a fileFilters
, files containing .min.
in their names will be ignored
webloader:
js:
default: # your WebLoader js control name
files:
- script.js
- script.min.js # this file will not be filtered by @jsMin
fileFilters:
- @jsMin