collab/module-additional-criticals

Magento 2 module which loads additional critical CSS files per specific layout handles

1.0.0 2024-08-13 11:52 UTC

This package is auto-updated.

Last update: 2024-11-13 12:26:59 UTC


README

The Collab_AdditionalCriticals module is a simple module that differentiates critical styles used across different areas of Your Magento app.

Configuration

Module does not have any configuration options. You just need to fulfill the requirements specified in prerequisites.

Pre-requisites

  • dev/css/use_css_critical_path must be set to 1 in core_config_data or in config.php/etc.php
  • category.css, simple-product.css and configarble-product.css along with critical.css must be present in app/design/frontend/<Vendor>/<Theme>/web/css/ directory. Those need to be generated by You or Your team using custom grunt tasks for example, this module does not provide any of those files.

How it works?

At specific layout handles module removes default critical CSS block filled with contents of critical.css file and creates new block with contents taken from previously prepared files.

Why choose this extension over other solutions?

We don't believe in efficient modules which have tons of options - simple as that - modules which have multiple options, are prepared for many integrations always have some performance footprint for application. Having this in mind we are trying to provide simple, portable and independent modules which sometimes require some basic Magento 2 development skills.

Installation details

composer req collab/module-additional-criticals
bin/magento setup:upgrade