ideal-creative-lab/laravel-tachyon
Illuminate\Http\Response).Kernel.php) or via response macros (e.g., Response::macro('tachyon', fn($response) => ...)).@stack, @section, and dynamic content but may require exclusion rules for APIs or non-HTML responses (e.g., JSON, XML).Cache::remember). Requires testing with Cache::tags() or Cache::forever().[data-tachyon-exclude]).wire:ignore or wire:effect attributes.composer.json constraints and test thoroughly.Cache::remember()?queue:work), ensure minification doesn’t block job processing.spatie/laravel-html).composer require ideal-creative-lab/laravel-tachyon.config('tachyon.enabled'))./about, /blog).wire:ignore on sensitive elements.'excludes' => [
'admin/*',
'api/*',
'partials/error-blade',
],
Cache::tags('html')).app/Http/Kernel.php:
protected $middleware = [
\Dotninth\Tachyon\Middleware\MinifyHtml::class,
];
Response::macro('minify', fn($response) => app(\Dotninth\Tachyon\Facades\Tachyon::class)->minify($response));
wire:key to avoid hydration issues.config/tachyon.php (e.g., exclusions, minification rules).'rules' => [
'remove_comments' => true,
'collapse_whitespace' => true,
'preserve_doctype' => true,
],
composer why-not to detect version clashes with other packages.config/tachyon.php:
'debug' => env('APP_ENV') === 'local',
data-tachyon-exclude to critical elements.tachyon:minify job) for async processing.Cache::tags('tachyon').View::make()) may slow if templates are complex.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Package crashes during minification | 500 errors for affected routes | Fallback to unminified response |
| Livewire + Tachyon race condition | Flickering UI |
How can I help you explore Laravel packages today?