mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 16:04:04 +00:00
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
This commit is contained in:
parent
3984d64cfa
commit
37667bd9e7
3 changed files with 126 additions and 39 deletions
|
|
@ -5,8 +5,8 @@ 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\Overrides\Vite;
|
||||
use Stancl\Tenancy\Tenancy;
|
||||
|
||||
class ViteBundler implements Feature
|
||||
|
|
@ -21,6 +21,8 @@ class ViteBundler implements Feature
|
|||
|
||||
public function bootstrap(Tenancy $tenancy): void
|
||||
{
|
||||
$this->app->singleton(\Illuminate\Foundation\Vite::class, Vite::class);
|
||||
Vite::createAssetPathsUsing(function ($path, $secure = null) {
|
||||
return global_asset($path);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue