Magento_Baler module introduces functionality to preload theme JS bundles configuration (core-bundle.js & requirejs-bundle-config.js) generated by 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
mkdir app/code/Magento
git clone https://github.com/magento/m2-baler.git app/code/Magento/Baler
bin/magento setup:upgrade
Open you composer.json
and 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, then run:
composer config repositories.magento-baler vcs [email protected]:magento/m2-baler.git
composer require magento/module-baler:dev-master
bin/magento module:enable Magento_Baler
bin/magento setup:upgrade
This module is available as alpha composer package on repo.magento.com
. This package works both with 2.3.x and 2.4.x Magento releases.
Steps to install it:
- Add
"magento/module-baler": "1.0.0-alpha"
torequire
section ofcomposer.json
So,require
section looks like:"require": { "magento/product-community-edition": "2.3.4", "magento/module-baler": "1.0.0-alpha" },
- Run
composer update
command. bin/magento module:enable Magento_Baler
bin/magento setup:upgrade
Getting started with the alpha
If you found a bug in this module, please open a new issue or refer to Code Of Conduct.