Hello,
I am using Laravel and have essentially cloned the Livewire repo from here: https://github.com/keenthemes/metronic-tailwind-html-integration/tree/main/metronic-tailwind-laravel-livewire
At the moment I see 'Detected multiple instances of Alpine running' in console. I can resolve by commenting this out in the app.js file but suspect that's probably not the intended approach given this is an example for Livewire?
I was reading the docs on the templates for this (https://keenthemes.com/metronic/tailwind/docs/getting-started/integration/laravel-livewire) and would welcome guidance on step 4 to preserve JS functionality as KT menu highlighting isn't working for me at the moment and wonder if I'm missing something. I'm new to Laravel/Livewire so not sure where the code listed would need to be included in relation to the templates.
Any support most welcome.
Many thanks
Hi Matthew
warning occurs because Alpine.js is being initialized both by Livewire and manually in your app.js file. Here's the immediate workaround:
- In your resources/js/app.js file, comment out or remove the manual Alpine.js initialization:
- Replace the manual Alpine.js initialization with a check to prevent double initialization:
We will fix these issues in the boilerplate repository. We will update the integration to properly handle Alpine.js initialization conflicts and KTMenu highlighting works correctly with Livewire's DOM updates.