1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:04:04 +00:00

Use assetPathResolver closure if set (#1221)

The original Vite Facade uses the assetPathResolver closure (if set) to generate assets with a custom URL. This is needed when for example assets are cached on a CDN, or if you need assets from a central URL while in Tenant context.

This updates the Tenancy version of the Vite-Facade to bring back the assetPathResolver logic.
This commit is contained in:
Bert Bredewold 2024-05-13 17:15:26 +02:00 committed by GitHub
parent 4dab0c1870
commit 120b8bc4ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,6 +15,6 @@ class Vite extends BaseVite // todo move to a different directory in v4
*/
protected function assetPath($path, $secure = null)
{
return global_asset($path);
return $this->assetPathResolver ? ($this->assetPathResolver)($path, $secure) : global_asset($path);
}
}