Any alternative way to load filament forms? (caching issues)
So I have a website that uses Livewire and Alpine. The original setup was like this:
layout.blade.php (before)
site.js (before)
I decided to try filament forms builder in this site. I removed Livewire / Alpine imports because filament provides these:
layout.blade.php (after)
site.js (after)
This all worked fine locally, but when I deployed to a server, where static caching is enabled (provided by Statamic CMS) none of my Alpine components worked after the first load (things get cached then).
Uncaught ReferenceError: Alpine is not defined
I've tried things like:
but again, the event only gets fired on the first load, not when cached.
So it looks like I will abandon trying to integrate Filament Forms into a Statamic site, but I'm wondering if there is an alternative way to import Filament Forms? Something along the lines of a more standard Livewire / Alpine installation.
Any other ideas would be appreciated!
Thank you.0 Replies