PHPackages                             dnafactory/module-critical - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. dnafactory/module-critical

ActiveMagento2-module

dnafactory/module-critical
==========================

A module that allows to serve the critical.css generated by less, directly from the static contents.

1.0.4(4mo ago)02.7k↓50%2BSD-3-ClausePHPPHP ^7.1|^8.1

Since Oct 21Pushed 4mo ago3 watchersCompare

[ Source](https://github.com/dnafactory/magento2-module-critical)[ Packagist](https://packagist.org/packages/dnafactory/module-critical)[ RSS](/packages/dnafactory-module-critical/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (7)Used By (2)

Critical css generation by sources
----------------------------------

[](#critical-css-generation-by-sources)

[![License](https://camo.githubusercontent.com/d76db1401f48ce3b2726e4b38612edb14e8db366c02a2ddddf4d05f7c8c04fb2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d2d436c617573652d626c75652e7376673f7374796c653d666f722d7468652d6261646765)](https://opensource.org/licenses/BSD-3-Clause)
==================================================================================================================================================================================================================================================================================================================================

[](#)

A module that handles the critical css generation from less sources.

---

### The elephant in the room

[](#the-elephant-in-the-room)

If you want to serve critical css as less sources, of course, you can put your critical.less in your custom theme directory.

```
app/design/frontend/[Vendor]/[Custom-Theme]/web/css/critical.less
```

And then, in the static:content:deploy phase, the critical.css file will be generated and saved in the static content folder. However, even in production mode, Magento will always try to fetch that file from the source directory, so it will re-build critical.css on each request.

### Solution

[](#solution)

This module simply replaces Magento's original ViewModel that reads the critical.css content, to fetch it from the static content folder instead.

*Happy Coding*

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance74

Regular maintenance activity

Popularity20

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~382 days

Total

5

Last Release

141d ago

PHP version history (2 changes)1.0.0PHP ~7.1

1.0.2PHP ^7.1|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae060630c3f388ec31ba0a230764210b441db7fdca225c670e11e843cbce3ef6?d=identicon)[dnafactory](/maintainers/dnafactory)

---

Top Contributors

[![ciroarcadio](https://avatars.githubusercontent.com/u/5919607?v=4)](https://github.com/ciroarcadio "ciroarcadio (7 commits)")

---

Tags

thememagento2critical

### Embed Badge

![Health badge](/badges/dnafactory-module-critical/health.svg)

```
[![Health](https://phpackages.com/badges/dnafactory-module-critical/health.svg)](https://phpackages.com/packages/dnafactory-module-critical)
```

###  Alternatives

[scandiweb/satoshi

Satoshi Theme for Magento 2 on Hyva - High-performance, user experience-focused theme

2881.2k](/packages/scandiweb-satoshi)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
