Conversation
b042ce7 to
187bd74
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:BladeIconsServiceProvider::register()— sets up an "after resolving" callback on the view factory. When fired, it registers all known icon sets as Blade components.BlazeServiceProvider::register()— resolves the view factory for the first time viaView::macro(). This fires the callback from step 1, but only the icon sets registered so far are present.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()toboot().This is also the correct Laravel convention — resolving other services should happen in
boot(), notregister(), precisely to avoid this class of ordering bugs.Fixes #18