Skip to content

Comments

Add Blade fallback for delegate components#42

Merged
ganyicz merged 1 commit intomainfrom
filip/add-delegate-fallback
Feb 19, 2026
Merged

Add Blade fallback for delegate components#42
ganyicz merged 1 commit intomainfrom
filip/add-delegate-fallback

Conversation

@ganyicz
Copy link
Collaborator

@ganyicz ganyicz commented Feb 19, 2026

The scenario

A user has Blaze installed and uses a custom Flux icon or variant:

<flux:icon name="custom" />

Where "custom" is a Blade view in resources/views/flux/icon/custom.blade.php without a @blaze directive.

The problem

The icon component uses flux::delegate-component and Blaze assumes all delegate targets are optimized.

But the custom icon template doesn't have @blaze, therefore it's not compiled into a function.

Resulting in an exception:

Call to undefined function _eab27ebdf4ee954a9a05ceed5425e512()

The solution

Instead of forcing all custom components to be blaze-compiled (livewire/flux#2411), we check at runtime whether the delegate target is a Blaze component. If not, we skip Blaze entirely and fall back to standard Blade rendering.

Custom components without @blaze just work — no configuration needed, no forced compilation.

Replaces livewire/flux#2411.

@ganyicz ganyicz merged commit dd10c9e into main Feb 19, 2026
3 checks passed
@ganyicz ganyicz deleted the filip/add-delegate-fallback branch February 19, 2026 18:25
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