Skip to content

Comments

Detect livewire#37

Merged
ganyicz merged 1 commit intomainfrom
filip/detect-livewire
Feb 19, 2026
Merged

Detect livewire#37
ganyicz merged 1 commit intomainfrom
filip/detect-livewire

Conversation

@ganyicz
Copy link
Collaborator

@ganyicz ganyicz commented Feb 19, 2026

The scenario

Using Livewire features like $__livewire or @entangle inside compiled Blaze components.

<div x-data="{ name: @entangle('name') }"></div>

which compiles to

<div x-data="{ name: Livewire.find('{{ \$__livewire->getId() }}').entangle('name') }"></div>

The problem

The wrapper doesn't detect or inject $__livewire, so components using @entangle or $__livewire fail at runtime.

The solution

Detect $__livewire and @entangle in source/compiled output and inject:

$__livewire = $__env->shared('__livewire');

@ganyicz ganyicz merged commit 3c7959a into main Feb 19, 2026
6 checks passed
@joshhanley joshhanley deleted the filip/detect-livewire branch February 19, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant