manifest / performance / minit
Minit #3 in Performance & Caching
A WordPress plugin to combine CSS and Javascript files.
★ 280stars
389composer installs
42forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/kasparsd/minit/archive/refs/heads/master.zipAlso on Packagist as kasparsd/minit:
composer require kasparsd/minitDeclares an update source (https://updates.wpelevator.com/wp-json/update-pilot/v1/plugins), so updates arrive through the plugin's own updater.
From the readme
Minit for WordPress
Places all your CSS and Javascript files into dedicated bundles that can be cached by browsers and re-used between requests. It assumes that a single request with slightly larger transfer size is more performant than multiple smaller requests (even with HTTP/2 multiplexing).
Install
Install using Composer:
composer require kasparsd/minit
or by manually downloading the latest release file.
How it Works
- Concatenates all CSS files and Javascript files one file for each type (.js and .css), and stores them in the WordPress uploads directory under /minit. See the configuration section below for how to exclude files from the bundle.
- Uses the combined version numbers of the enqueued assets to version the bundles.
- Loads the concatenated Javascript file in the footer as deferred. This will probably break all inline scripts that rely on jQuery being available. See the configuration section below for how to disable this.
Screenshots
1. All CSS files combined in a single file
2. All external Javascript files loading asynchronously
Configuration
See the Wiki for additional documentation.
Disable Deferring Javascript
Use the minit-script-tag-async fil
Read the full README on GitHub →