Alpine Turbo Drive Adapter
Alpine-turbo-drive-adapter, formerly alpine-turbolinks-adapter, allows you to add support for Alpine.js to your Turbolinks/Turbo powered apps. It handles events to properly clean up the DOM from Alpine generated code when navigating between pages.
<script src="https://firstname.lastname@example.org/dist/alpine-turbo-drive-adapter.min.js" defer></script> before your Alpine script in your page
Install the package
npm i alpine-turbo-drive-adapter
Include it in your script along with Alpine JS.
import 'alpine-turbo-drive-adapter' import 'alpinejs'