The spa-router.js was loaded with defer but registered the Alpine.js
store using the 'alpine:init' event. Since Alpine.js also loads with
defer, there was a race condition where Alpine could initialize before
the event listener was registered, causing $store.router to be undefined.
Moved the entire router store definition and registration inline in
spa.html so it's guaranteed to be registered before Alpine.js initializes.
Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>