feat(server): plugins can create islands (#1472)

This commit is contained in:
Reed von Redwitz
2023-11-22 11:19:13 +01:00
committed by GitHub
parent ad2341dada
commit 72edafde46
9 changed files with 137 additions and 11 deletions
+14
View File
@@ -163,3 +163,17 @@ For more examples see the [Concepts: Routing](/docs/concepts/routing) page.
To create a middleware you need to create a `MiddlewareHandler` function.
And to create a route you can create both a Handler and/or component.
A very basic example can be found
[here](https://github.com/denoland/fresh/blob/main/tests/fixture_plugin/utils/route-plugin.ts).
### Islands
You can create islands that get loaded and rendered like normal
[islands](/docs/concepts/islands).
You need to provide the location of your plugin and an array of island
filenames. The intent is to somewhat mimic the manifest file.
A very basic example can be found
[here](https://github.com/denoland/fresh/blob/main/tests/fixture_plugin/utils/route-plugin.ts).