๐—ฆ๐—›๐—œ๐—ฃ๐—ฃ๐—œ๐—ก๐—š ๐—Ÿ๐—œ๐—ฉ๐—˜๐—ช๐—œ๐—ฅ๐—˜ ๐Ÿฐ ๐—”๐—ก๐—— ๐—™๐—Ÿ๐—จ๐—ซ ๐—œ๐—ก ๐—” ๐—ฃ๐—”๐—–๐—ž๐—”๐—š๐—˜

Bundling an admin UI in a Laravel package is hard. Apps have built-in tools. Packages do not.

I hit four 500 errors while building laravel-config-webhook. Here are the lessons.

Component Naming Avoid double colons (::) in component names. Livewire 4 views these as namespaces. It will miss your component. Use dots instead.

Flux Icons Pro icons crash on free tiers. Use only free icons. I now use static tests to check icons against Flux files.

Vite Assets Avoid @vite in fallback layouts. Host apps lack compiled manifests. This causes a ViteManifestNotFoundException. Use a self-contained layout with a CDN.

Config Defaults Avoid placeholder strings in your config. Placeholders stop your fallback logic. Set defaults to null. This lets your fallback layout work.

Testing Build a workbench for your package. Test the full path. Seed data and verify routes. This prevents bugs.

Assume the host app provides nothing. Make your fallbacks self-sufficient.

Source: https://dev.to/nasrulhazim/shipping-a-livewire-4-flux-admin-ui-inside-a-package-four-gotchas-that-500d-on-me-1obp Optional learning community: github.com/cleaniquecoders/laravel-config-webhook