Laravel Livewire Plugin

by aerni

Laravel Livewire doesnโ€™t work by default with Swup. The Livewire components work on initial page load but stop working on subsequent pages rendered by Swup. This plugin fixes this issue and brings support for Laravel Livewire to Swup.


This plugin can be installed with npm

npm install @swup/livewire-plugin

and included with import

import SwupLivewirePlugin from '@swup/livewire-plugin';

or included from the dist folder

<script src="./dist/SwupLivewirePlugin.js"></script>


To run this plugin, include an instance in the swup options.

const swup = new Swup({
    plugins: [new SwupLivewirePlugin()]