Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Qoliber Hyvä Module Registration

Hyvä compiles Tailwind only from the module paths listed in app/etc/hyva-themes.json (bin/magento hyva:config:generate). This module fills that list for Qoliber modules.

What gets registered

  • Automatically (1.1.0+): every enabled module named Qoliber_<Base>Hyva or Qoliber_<Base>HyvaCheckout. A companion that follows the naming convention ships no registration code at all.
  • Explicitly: modules outside the convention add themselves through the observer's moduleList argument, in their global etc/di.xml:
<type name="Qoliber\HyvaModuleRegistration\Observer\RegisterModulesForHyva">
    <arguments>
        <argument name="moduleList" xsi:type="array">
            <item name="Vendor_Module" xsi:type="string">Vendor_Module</item>
        </argument>
    </arguments>
</type>

Never declare moduleList in etc/frontend/di.xml (or any other area). Magento applies an area's DI arguments on top of the global ones with array_replace: an area-scoped list replaces the global one instead of merging with it, and every other module's entry disappears from hyva-themes.json. Within one scope the entries of all modules merge.

Tuning

namePattern (constructor argument, PCRE, default /^Qoliber_.+Hyva(Checkout)?$/) widens or narrows the automatic registration; an empty string disables it.

After installing or updating a Hyvä companion

bin/magento hyva:config:generate   # rewrites app/etc/hyva-themes.json
# rebuild the theme CSS (npm run build in <theme>/web/tailwind), then static-content:deploy

Every enabled Qoliber_*Hyva* module must appear in the JSON.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages