Yireo_HyvaThemeAutoRegistration

PHP 8.1 - 8.4
Magento 2.4.7 | 2.4.8
CSP Yes
Latest Release 1.0.7

Magento version PHP version License Latest Version

Magento 2 module to make it easier to register a custom tailwind.config.js file of your own module in the global Hyvä Themes Tailwind configuration

Background

Hyvä Themes offers a Magento 2 CLI command hyva:config:generate to allow building a file app/etc/hyva-themes.json that again is used in modern-day Tailwind configuration of Hyvä-based themes. However, to extend this, one must add a custom observer to the module, which leads to a lot of code duplication across your modules. This module aims to simplify this. It offers an observer following the official Hyvä documentation.

However, this observer automatically registers any module that has a prefix Yireo_ or YireoTraining_ (it works for me). And it allows for extending things with a DI plugin.

Usage

Add this module as a dependency to your composer.json file and etc/module.xml file.

Next, add the following DI configuration to your module its etc/di.xml file (assuming here that Foo_Bar is the name of your own module):

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Yireo\HyvaThemeAutoRegistration\Observer\RegisterModuleForHyvaConfig">
        <arguments>
            <argument name="moduleNames" xsi:type="array">
                <item name="Foo_Bar" xsi:type="string">Foo_Bar</item>
            </argument>
        </arguments>
    </type>
</config>

Alternatively, you can include all your modules by configuring a module prefix:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Yireo\HyvaThemeAutoRegistration\Observer\RegisterModuleForHyvaConfig">
        <arguments>
            <argument name="modulePrefixes" xsi:type="array">
                <item name="Foo_" xsi:type="string">Foo_</item>
            </argument>
        </arguments>
    </type>
</config>

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation

Support

For getting support, create an Issue under the following project URL:

https://github.com/yireo/Yireo_HyvaThemeAutoRegistration

Composer details
Magento module name
Yireo_HyvaThemeAutoRegistration
Composer name
yireo/magento2-hyva-theme-auto-registration
Composer version
1.0.7
Default branch
master
Requirements
magento/framework: ^102.0|^103.0
php: >=8.2 <8.6
Releases
1.0.7 23 October 2026
1.0.6 23 October 2026
1.0.5 23 October 2026
1.0.4 23 October 2026
1.0.3 23 October 2026
1.0.2 23 October 2026
1.0.1 23 October 2026
1.0.0 23 October 2026
Changelog

[1.0.7] - 22 October 2025

Fixed

  • Copy generic CI/CD files
  • Add support for base-folder
  • Add PHP 8.4

[1.0.6]

  • Initial releases

Last modified: October 17, 2026