warpig's avatar
Level 12

Laravel 11, Breeze with Alpine and... Livewire?

My application is running on Laravel version 11.2.0 and have currently installed Breeze with Alpine but now I want to integrate Livewire but one of the prerequisites is to disable alpine, if i do that the entire application vanishes, or the front end just simply disappears, what can i do?

https://livewire.laravel.com/docs/quickstart#install-livewire

import './bootstrap';

import Alpine from 'alpinejs';
import persist from '@alpinejs/persist';

window.Alpine = Alpine;
Alpine.plugin(persist)
Alpine.start();
0 likes
1 reply
Snapey's avatar

from the docs

AlpineJS is bundled with Livewire

Because Alpine is bundled with Livewire's JavaScript assets, you must include @livewireScripts on every page you wish to use Alpine. Even if you're not using Livewire on that page.

There are other suggestions on the installation page to cover other scenarios

2 likes

Please or to participate in this conversation.