Getting started with the alpha
baler is still heavily under development, the setup process is not quite as simple as it's intended to be. This document will continue to be updated to describe the whole process of setup, from start to finish.
Please make sure to follow all steps in the order they're documented below.
You will need a version of
node.js that is >=
10.12.0. You can check if this is already available from the command line via
An installation of
npm, which will be needed for the next steps.
Clone the repository and install dependencies
git clone the repository locally. Then,
cd into the root directory and run
Verify unit tests pass
As a sanity check, run
npm test to verify that baler's unit tests are passing
Build from source
npm run build in the root of the
baler directory to compile from source
npm link in the
baler directory, which will add the
baler binary to your $PATH
Install and configure the
After the module is installed, run
bin/magento config:set dev/js/enable_baler_js_bundling 1 to enable loading of
Disable incompatible features in Magento
Run the following commands to disable incompatible features in your store:
bin/magento config:set dev/js/minify_files 0
bin/magento config:set dev/js/enable_js_bundling 0
bin/magento config:set dev/js/merge_files 0
Fix some things in Magento core
rm -rf the
pub/static directory of your store, and then run
bin/magento setup:static-content:deploy to ensure all files are deployed with incompatible features disabled.
In the root directory of your Magento 2 store, run
baler to optimizize all deployed front-end themes.
To make sure that
Magento_Baler gets a chance to participate in rendering, run
bin/magento cache:clean so new page caches can be generated
Visit your store
If all steps were followed in order, and you did not find any bugs, most pages in your storefront should now be faster than they were before.
If you found a bug, please open a new issue