when I use in Blade @if, @foreach etc. Laravel add extra
<!-- _ BLOCK _ --> <!-- _ ENDBLOCK -->
lines. How can I get rid of this. This was never happed before.
Laravel 10 + Livewire 3 (latest versions).
Basically it's from livewire. In the docs folder in the livewire repository, there is a readme file, called morph.md (https://github.com/livewire/livewire/blob/main/docs/morph.md#injecting-morph-markers)
Those are markers used by livewire as a guide to detect the difference between a change and an addition.
Per doc you can disable them by going into the configuration in your application's config/livewire.php
and use:
'inject_morph_markers' => false,
This should resolve your issue, but I would recommend to leave it on, as it is extremly beneficial to livewire applications.