notifications aren't showing up correctly at custom livewire layout

Continue the topic that was created on #notifications channel... I'm using a custom livewire layout to show public pages besides admin panel, I realize that when I configure my layout that way that is in the image, the notifications works as it should, but keep warning me at console that Alpine JS has already been loaded...and if I take out the manifest.js from the layout, notifications doesnt work at all...
24 Replies
Dennis Koch
Dennis Koch2y ago
So you probably imported Alpine in app.js? And it's probably also added via @stack or @livewireScripts
calebesantana
calebesantanaOP2y ago
Yepp I follow the docs, not sure If that's the right way since I already use notifications in admin panel? 🤔
Dennis Koch
Dennis Koch2y ago
What is manifest.js doing? I think I remember that was a thing with Laravel Mix?
ZedoX
ZedoX2y ago
What's in app.js & manifest.js? What are you using to compile the assets, I see that you are including it using the asset() helper instead of the mix/vite helper
calebesantana
calebesantanaOP2y ago
The app.js I'm pretty sure that is importing AlpineFloatingUI, Alpine and NotificationsAlpinePluginjust as said the docs...about the manifest.js I'm not sure, I think this file was created on some other process since I'm using Laravel Mix to compile my assets. Then I realized that the admin panel was loading this file and then I tried to use it in my layout and it works If I use just the app.js but inside the <body> tag, the notifications persist with that weird behaviour that it's being called, the network request it's happening and successfull, but it doesn't show the notification in my blade page, still invisible...
Dan Harrin
Dan Harrin2y ago
can you send app.js
calebesantana
calebesantanaOP2y ago
Dan Harrin
Dan Harrin2y ago
and manifest.js
calebesantana
calebesantanaOP2y ago
I just have the manifest.js compiled...that's why I'm not sure if I should use it in my livewire layout, I just put it there to test since my admin panel is loading this file..
calebesantana
calebesantanaOP2y ago
mix file
Dan Harrin
Dan Harrin2y ago
what is manifest though whats in it
calebesantana
calebesantanaOP2y ago
Dan Harrin
Dan Harrin2y ago
so you just imported a random js file into your layout? i want to know whats in it i cant read compiled js code
calebesantana
calebesantanaOP2y ago
I just have the manifest.js compiled...that's why I'm not sure if I should use it in my livewire layout, I just put it there to test since my admin panel is loading this file..
Dan Harrin
Dan Harrin2y ago
compiled from what i dont understand
calebesantana
calebesantanaOP2y ago
Well, as I said, filament admin panel is loading this file and I put this just to test if I'm missing something that this manifest file has that my app.js it doesnt...I just had followed the notifications docs to install it in my livewire layout, forget about the manifest since this file doesnt exist in the docs guide..
Dennis Koch
Dennis Koch2y ago
I think it's the webpack loader stuff that Laravel Mix puts in a separate file
Dan Harrin
Dan Harrin2y ago
thats a .json file? this is a compiled .js file
Dan Harrin
Dan Harrin2y ago
ive never seen this generated
Dennis Koch
Dennis Koch2y ago
I think you need to configure it. Not sure why the OP has this file though
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
calebesantana
calebesantanaOP2y ago
Solved by migrating from Laravel Mix to Vite.
Want results from more Discord servers?
Add your server