Adding "page_speed_X" attribute breaks class attribute for AlpineJS
Closed this issue ยท 0 comments
Pixel-Tony commented
๐ Context
When using the package, classes of type page_speed_...
are added to the start of relevant elements, but in doing so, class
attribute is being replaced by :class
. This breaks AlpineJS, as it recognises resulting :class
as an x-bind directive, which it obviously isn't. Also, the original :class
attribute is replaced if present.
๐ข Steps to reproduce
- Enable usage of the package in the project.
- Use
class
attribute on element inside other element containing x-data. - Try to enter the page.
๐ Expected behaviour
class
attribute will only get page_speed_...
appended to it, enabling speed-up.
๐ Resulting behaviour
class
attribute C is replaced with :class
one, removing both original C and correct :class
one if present.