Accudio / async-alpine

Async Alpine brings advanced code splitting and lazy-loading to Alpine.js components!
https://async-alpine.dev
Apache License 2.0
152 stars 12 forks source link

Allow setting custom prefix for Async Alpine #15

Closed Accudio closed 2 years ago

Accudio commented 2 years ago

We support custom prefixes for Alpine, but the likelihood is if someone is using that it's because they want HTML validation.

In that case Async Alpine doesn't allow setting a custom prefix in order to pass validation.

We should change the API so you can declare a custom prefix for Alpine and for Async Alpine. Proposed:

AsyncAlpine(Alpine, {
  prefix: 'data-ax-',
  alpinePrefix: 'data-x-'
})
Accudio commented 2 years ago

Added in 0.3.0