Skip to content

Comments

Fix service provider#34

Merged
ganyicz merged 1 commit intomainfrom
filip/fix-service-provider
Feb 18, 2026
Merged

Fix service provider#34
ganyicz merged 1 commit intomainfrom
filip/fix-service-provider

Conversation

@ganyicz
Copy link
Collaborator

@ganyicz ganyicz commented Feb 18, 2026

The scenario

Installing Blaze alongside packages that register Blade components (e.g., blade-lucide-icons) breaks component resolution.

The problem

The service provider was performing all of its setup in register(). This prematurely resolved the view factory, causing Blade UI Icons to register its components before icon set libraries could add their presets.

The exact sequence during the register() phase:

  1. BladeIconsServiceProvider::register() — sets up an "after resolving" callback on the view factory. When fired, it registers all known icon sets as Blade components.
  2. BlazeServiceProvider::register() — resolves the view factory for the first time via View::macro(). This fires the callback from step 1, but only the icon sets registered so far are present.
  3. BladeLucideIconsServiceProvider::register() — adds the lucide icon set. But the Blade components were already registered in step 2 and won't be registered again. The lucide icons are never registered as Blade components.

The result: <x-lucide-activity /> throws an "Unable to locate view" error.

The solution

Moved everything except container bindings from register() to boot().

This is also the correct Laravel convention — resolving other services should happen in boot(), not register(), precisely to avoid this class of ordering bugs.

Fixes #18

@ganyicz ganyicz changed the title Refactor service provider Fix service provider bindings Feb 18, 2026
@ganyicz ganyicz force-pushed the filip/fix-service-provider branch from b042ce7 to 187bd74 Compare February 18, 2026 23:02
@ganyicz ganyicz changed the title Fix service provider bindings Fix service provider Feb 18, 2026
@ganyicz ganyicz merged commit 509736d into main Feb 18, 2026
6 checks passed
@joshhanley joshhanley deleted the filip/fix-service-provider branch February 18, 2026 23:07
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.

Unable to locate a class or view for component [lucide-activity].

1 participant