Payments are experiencing issues due to temporary restrictions in Russia. If your payment does not go through, please submit a support request.Our support team is available 24/7 — we are always here to help with hosting and server issues.We are now accepting requests for dedicated server rental and colocation services in our data center.Reminder: we recommend enabling backups for additional data protection.A new VPS/VDS lineup with NVMe storage and improved performance is now available.Maintenance work on some servers has been completed. All services are operating normally.
LESS compiler (EcomLabs)

MODULE FOR 1C-BITRIX

eCom Labs

LESS compiler (EcomLabs)

The LESS compiler module is designed for frontend developers who use concise syntax with shared variables and nested class hierarchies. Code examples demonstrate the definition of color variables and element styling with media query support for responsive design. The module handler subscribes to the main/OnProlog system event, which is registered during installation via RegisterModuleDependences.

Technical details

Published
9 September 2026
Version
1.0.0
Installed
Fewer than 50 times
Compatible editions
First Site, Start, Standard, Small Business, Business
Responsive design
Yes
Composite support
Yes
Compatible with Sites24
No
Developer
eCom Labs

What this solution does

The LESS compiler module is designed for frontend developers who use concise syntax with shared variables and nested class hierarchies. Code examples demonstrate the definition of color variables and element styling with media query support for responsive design.

The module handler subscribes to the main/OnProlog system event, which is registered during installation via RegisterModuleDependences. This ensures automatic processing on every request without the need for manual file inclusion.

When the module is active, the system scans the site's file structure to collect all .less files. By default, directories such as bitrix/, upload/, vendor/, node_modules/, and .git/ are excluded, though this exclusion list can be configured in the administrative panel.

The module compiles LESS files according to a manual list. To track changes, a state fingerprint is calculated for each file, including the path, last modification time, and size. If the fingerprint matches the saved one and the compiled style.css file already exists, no rebuild is triggered, and the page receives a link to the ready resource. When the fingerprint changes due to adding, deleting, or editing a file, the files are recompiled via Less_Parser, and the result atomically replaces the old style.css. The final file is saved to the /upload/ecl_lesscompiler/SITE_ID/style.css directory, where SITE_ID is the unique site identifier. Connection is performed in the head section via a separate link tag using the $APPLICATION->SetAdditionalCSS() method, independently of other site CSS templates. In composite site mode, the handler accesses only the file system and adds a link to a static file. When generating a composite page snapshot, this link tag is included in the cached HTML, and the browser subsequently requests the style.css file directly, bypassing PHP. The composite caching mechanism remains unaffected. The directory scan in 'all files' mode is additionally cached for 60 minutes via Bitrix\Main\Data\Cache to avoid traversing the directory tree on every hit. The 'Force rebuild now' button in settings clears this cache and triggers immediate CSS recompilation.

Compilation errors in LESS, including syntax errors or missing @import directives, are logged to the Bitrix event log. This prevents the page from breaking. If a working style.css file was previously compiled, the system serves that existing file.

General iT can install “LESS compiler (EcomLabs)”, configure its settings and verify its operation in the existing project.

USER EXPERIENCE

Solution reviews

How does this solution work in a real project? Share your experience and help others choose.

Be the first to share your experience

There are no reviews of this solution on git.ru yet. Tell us what worked well and what could be improved.

Verified purchaseAdd a key if you wish. A verified review gets a badge, priority placement and more rating weight.

Open to every clientJust sign in to your account. A key is optional; all reviews are moderated.

YOUR EXPERIENCE MATTERS

Your review

YOUR PROJECT INFRASTRUCTURE

A home for your website

BEFORE YOU ORDER

Let’s go through the details.

Is installation free?
The solution itself is free. Installation, configuration and customisation services are agreed separately. A compatible platform and an appropriate platform licence are required.
How do I check compatibility?
Compare the supported editions and solution version in the technical details with your project. Before installing on a live website, we recommend making a backup and checking the solution in a test environment.
Can you help with implementation?
We can help install the module, check its settings and verify how it works in your project. Compatibility with other customisations and the scope of work are assessed before we begin.

GENERAL iT

Let’s discuss your project

Получатель: ООО «Дженерал Ай Ти Рус»

1C-BITRIX

Install solution

Enter a domain with or without https://. The installer will open in your website control panel in a new tab.

Solution screenshots

Solution screenshot