diff --git a/navigation.php b/navigation.php index 1f1befb..b4e62ee 100644 --- a/navigation.php +++ b/navigation.php @@ -156,6 +156,7 @@ return [ 'Tenant Config' => 'features/tenant-config', 'Cross-domain redirect' => 'features/cross-domain-redirect', 'Universal routes' => 'features/universal-routes', + 'Vite bundler' => 'features/vite-bundler', ], ], ], @@ -207,6 +208,7 @@ return [ 'Livewire' => 'integrations/livewire', 'Orchid' => 'integrations/orchid', 'Sanctum' => 'integrations/sanctum', + 'Vite' => 'integrations/vite', ], ], 'Console commands' => 'console-commands', diff --git a/source/docs/v3/features/vite-bundler.blade.md b/source/docs/v3/features/vite-bundler.blade.md new file mode 100644 index 0000000..3abf2b4 --- /dev/null +++ b/source/docs/v3/features/vite-bundler.blade.md @@ -0,0 +1,9 @@ +--- +title: Vite bundler +extends: _layouts.documentation +section: content +--- + +# Vite bundler {#vite-bundler} + +Enabling the ViteBundler feature makes Vite generate the correct asset paths using the `global_asset()` helper. diff --git a/source/docs/v3/integrating.blade.md b/source/docs/v3/integrating.blade.md index 1f3d9dc..30d59de 100644 --- a/source/docs/v3/integrating.blade.md +++ b/source/docs/v3/integrating.blade.md @@ -16,3 +16,4 @@ If you're using the [automatic mode]({{ $page->link('automatic-mode') }}) & [mul - [Laravel Telescope]({{ $page->link('integrations/telescope') }}) - [Livewire]({{ $page->link('integrations/livewire') }}) - [Laravel Sanctum]({{ $page->link('integrations/sanctum') }}) +- [Vite]({{ $page->link('integrations/vite') }}) diff --git a/source/docs/v3/integrations/vite.blade.md b/source/docs/v3/integrations/vite.blade.md new file mode 100644 index 0000000..5cb303d --- /dev/null +++ b/source/docs/v3/integrations/vite.blade.md @@ -0,0 +1,9 @@ +--- +title: Vite integration +extends: _layouts.documentation +section: content +--- + +# Vite {#vite} + +Enable the ViteBundler feature in the `tenancy.features` config to make Vite generate asset paths correctly. diff --git a/source/docs/v3/optional-features.blade.md b/source/docs/v3/optional-features.blade.md index 8b8b9e4..1922f69 100644 --- a/source/docs/v3/optional-features.blade.md +++ b/source/docs/v3/optional-features.blade.md @@ -13,6 +13,7 @@ section: content - [`TenantConfig`]({{ $page->link('features/tenant-config') }}) for mapping keys from the tenant storage into the application config - [`CrossDomainRedirect`]({{ $page->link('features/cross-domain-redirect') }}) for adding a `domain()` macro on `RedirectResponse` letting you change the intended hostname of the generated route - [`UniversalRoutes`]({{ $page->link('features/universal-routes') }}) for route actions that work in both the central & tenant context +- [`ViteBundler`]({{ $page->link('features/vite-bundler') }}) for making Vite generate the correct asset paths All of the package's Features are in the `Stancl\Tenancy\Features` namespace. You may register features by adding their class names to the `tenancy.features` config.