Open xHeaven opened 7 months ago
This looks like a hard one one to solve. It seems to be that the anonymous components are used at the root level of the Livewire components, which breaks things. If I edit AnonymousBladeComponentCommenter and wrap the comment in a div the error goes away, but the styling is messed up.
I don't believe there's a way to check if the component is being used in a Livewire component at the stage where we add the comment.
The best solution might be that I extend the exludes functionality and add the Pulse namespace as a default to exclude when adding comments to anonymous components. Not ideal, but at least it would stop breaking Pulse.
Dear contributor,
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
We're also experiencing this issue and cannot figure out how to disable laravel-blade-comments
for just Laravel Pulse.
Any tips on how we might go about doing that? The following doesn't do the trick:
/*
* Do not add comments to the output of these directives.
*/
'excludes' => [
'includes' => [
'vendor.pulse.dashboard', // TODO: Disable for Pulse. This does not seem to work.
],
],
What happened?
The package breaks Laravel Pulse's interface. See more here: https://github.com/laravel/pulse/issues/91
How to reproduce the bug
Install Laravel Pulse (currently v1.0.0-beta5), then install this package (currently v1.2.2), enable the
AnonymousBladeComponentCommenter
and visityour.app/pulse
.Package Version
1.2.2
PHP Version
8.3.0
Laravel Version
10.35.0
Which operating systems does with happen with?
macOS, Windows, Linux
Notes
No response