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
Benjamin4mo ago
I did this too because if I remove @livewireScripts, some components doesn't work, like Tabs, Wizard, etc.
awcodes
awcodes4mo ago
You don’t need the livewire directives. They are automatically injected with v3
awcodes
awcodes4mo 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
Benjamin4mo 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
awcodes4mo ago
Just read through, the link. And try to understand where it all works and why/if it’s needed in your particular app.

Did you find this page helpful?