Does @livewireScripts directive still need to be included when using @filamentScripts?

The TALL preset base.blade.layout has @livewireScripts & @livewireStyles. I want to use filament in the front-end, so I've inserted the @filamentScripts & @filamentStyles directives.
<html>
<head>
@livewireStyles
@filamentStyles
@vite('resources/sass/app.scss')
</head>

<body>
@yield('body')

@livewireScripts
@filamentScripts
@vite('resources/js/app.js')
</body>
</html>
<html>
<head>
@livewireStyles
@filamentStyles
@vite('resources/sass/app.scss')
</head>

<body>
@yield('body')

@livewireScripts
@filamentScripts
@vite('resources/js/app.js')
</body>
</html>
Have I placed the directives in the correct order?
6 Replies
Benjamin
Benjamin2mo ago
I did this too because if I remove @livewireScripts, some components doesn't work, like Tabs, Wizard, etc.
awcodes
awcodes2mo ago
You don’t need the livewire directives. They are automatically injected with v3
awcodes
awcodes2mo ago
But if you are adding any alpine components on the front end you will need to use the @livewireScriptConfig directive. https://livewire.laravel.com/docs/installation#manually-bundling-livewire-and-alpine
Laravel
Installation | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Benjamin
Benjamin2mo ago
Oh okay, this code was not working :
@filamentScripts
<!-- @livewireScripts -->
<!-- @livewireScriptConfig -->
@filamentScripts
<!-- @livewireScripts -->
<!-- @livewireScriptConfig -->
If I remove the comments it works. And I think @livewireScriptConfig is not need either because if I add it then it doesn't work @awcodes : https://filamentphp.com/docs/3.x/notifications/upgrade-guide#javascript-assets
awcodes
awcodes2mo ago
Just read through, the link. And try to understand where it all works and why/if it’s needed in your particular app.
Want results from more Discord servers?
Add your server