Magento_Baler module introduces functionality to preload JS bundles configuration generated by https://github.com/DrewML/baler/ - tool for static analysis of Javascript dependencies.
This functionality is disabled by default and it can be enabled on the configuration page (Stores -> Configuration -> Advanced -> Developer -> Javascript Settings).
Developer settings is not displayed in production mode.
To enable this feature in production mode, the CLI command bin/magento config:set dev/js/enable_baler_js_bundling 1
can be used.
- The following features should be disabled when Magento_Baler is enabled:
- JS Bundling
- JS Minification
- Clone repository:
git clone https://github.com/adifucan/m2-baler.git
- Rename cloned
m2-baler
directory intoBaler
and place this directory intoapp/code/Magento
directory - Run
bin/magento setup:upgrade
- Add
"magento/module-baler": "dev-master"
torequire
section ofcomposer.json
So, yourrequire
section looks like:
"require": {
"magento/product-community-edition": "2.3.3",
"magento/module-baler": "dev-master"
},
- Change
"minimum-stability": "stable"
to"minimum-stability": "dev"
and add"prefer-stable": true
This means that composer will always use stable package unless there is one. If there is no stable package it will use dev version. - Add
{
"type": "git",
"url": "https://github.com/adifucan/m2-baler.git"
}
to requires
section. So it looks like:
"repositories": [
{
"type": "composer",
"url": "https://repo.magento.com/"
},
{
"type": "git",
"url": "https://github.com/adifucan/m2-baler.git"
}
],
- Run
composer update
magento/module-baler
should be created invendor
folder.