Skip to content

v1.1.0

Latest

Choose a tag to compare

@Ynitial Ynitial released this 15 Feb 19:24
· 3 commits to main since this release

Laravel Blade Support

Added

  • Laravel Blade setup guide in README, CLAUDE.md, and llms.txt documenting the Blade precompiler approach
  • GitHub topics: laravel, blade, laravel-blade, tailwind-variants

Laravel Blade

Blade templates bypass Vite's transform pipeline (Tailwind reads them from disk, Laravel renders them server-side). This release documents the Blade precompiler solution:

Blade::precompiler(function (string $content) {
    return preg_replace_callback(
        '/((?:(?:[\w-]+|\[[^\]]*\]):)+)((?:[^\s\'"|]+\|)+[^\s\'"|]+)/',
        function ($matches) {
            $prefix = $matches[1];
            $utilities = explode('|', $matches[2]);
            return implode(' ', array_map(fn ($u) => $prefix . $u, $utilities));
        },
        $content
    );
});

Add this to your AppServiceProvider::boot() and run php artisan view:clear.