hyva-themes / magento2-hyva-admin

This module aims to make creating grids and forms in the Magento 2 adminhtml area joyful and fast.
https://hyva-themes.github.io/magento2-hyva-admin/
BSD 3-Clause "New" or "Revised" License
168 stars 39 forks source link

hyva-themes/magento2-hyva-admin#2 alpine.js loaded locally to avoid CSP #4

Closed paugnu closed 3 years ago

paugnu commented 3 years ago

Hi @Vinai and @wigman,

To solve hyva-themes/magento2-hyva-admin#2, I've:

I've tried doing what would be to be supposed the right way: adding it in the head block in the layout file. However, as Vinai already checked, this does not seem possible in Magento 2. Require js is loaded before the web starts breathing...

Please don't hesitate telling me if you think this could be done in a better/different way.

Vinai commented 3 years ago

@paugnu Thank you very much! Since loading alpine is @wigman's domain I would love to get his LGTM before merging.

wigman commented 3 years ago

This is perfect. As long as we don't have a proper way to fix the requirejs/alpinejs conflict this is the simplest way to do it. I'm pretty sure fixing it in another way will mean modifying the requirejs library, so let's no go there now :)