1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 10:44:04 +00:00
tenancy/src/Features/ViteBundler.php
Faris Alherf 37667bd9e7 Fix ViteBundler not affecting Vite static calls
Replace custom Vite class override with Vite::createAssetPathsUsing() to ensure ViteBundler works for both container and static usage when asset_helper_override is enabled.

Fixes #1388
2025-08-07 10:53:02 +03:00

28 lines
581 B
PHP

<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Features;
use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Vite;
use Stancl\Tenancy\Contracts\Feature;
use Stancl\Tenancy\Tenancy;
class ViteBundler implements Feature
{
/** @var Application */
protected $app;
public function __construct(Application $app)
{
$this->app = $app;
}
public function bootstrap(Tenancy $tenancy): void
{
Vite::createAssetPathsUsing(function ($path, $secure = null) {
return global_asset($path);
});
}
}