LESS compilation in Magento 2
Magento 2 provides two compile options for the LESS technology:
Server-Side compilation LESS: This is the default compilation model used by the Magento 2 system, and is performed by the server using the LESS
PHP
library. It is suitable for production environments.Client-Side compilation LESS: This is the compilation made by the client machine via the browser using the native
less.js
library. It is suitable for non-production environments.
In the Magento admin panel, you can adjust this setting by following this recipe:
In Magento Admin, navigate to Stores | Configuration | ADVANCED | Developer.
In the Store view, select Default Config.
Under Front-end development workflow, select the compilation mode: Server side less compilation or Client side less compilation.
Click Save Config.