docs: add tip about islands directory (#29913)

This commit is contained in:
RBV1 2024-11-14 12:47:50 +02:00 committed by GitHub
parent 394cf30109
commit 3409073b0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,6 +41,10 @@ Remote islands need `experimental.componentIslands` to be `'local+remote'` in yo
It is strongly discouraged to enable `dangerouslyLoadClientComponents` as you can't trust a remote server's javascript. It is strongly discouraged to enable `dangerouslyLoadClientComponents` as you can't trust a remote server's javascript.
:: ::
::note
By default, component islands are scanned from the `~/components/islands/` directory. So the `~/components/islands/MyIsland.vue` component could be rendered with `<NuxtIsland name="MyIsland" />`.
::
## Slots ## Slots
Slots can be passed to an island component if declared. Slots can be passed to an island component if declared.