When placing your template before the Volt methods any use class lines get duplicated, resulting in "name is already in use" errors. It works fine if the template comes after the Volt methods.
Steps To Reproduce
With this component:
<div>
// my template
</div>
<?php
use App\Concerns\Form;
use function Livewire\Volt\{uses};
uses(Form::class);
This is the compiled PHP:
<?php
use App\Concerns\Form;
?>
<div>
// my template
</div>
<?php
use App\Concerns\Form;
use function Livewire\Volt\{uses};
uses(Form::class); ?>
Volt Version
1.0.0
Laravel Version
10.20.0
PHP Version
8.2.9
Database Driver & Version
No response
Description
When placing your template before the Volt methods any use class lines get duplicated, resulting in "name is already in use" errors. It works fine if the template comes after the Volt methods.
Steps To Reproduce
With this component:
This is the compiled PHP: