fix: PluginRoute supports AsyncRoute and AsyncLayout (#2139)

This commit is contained in:
Reed von Redwitz
2023-12-04 16:56:00 +01:00
committed by GitHub
parent 993f1020b6
commit c8844ad98c
6 changed files with 93 additions and 16 deletions
@@ -3,10 +3,12 @@ import { handler as testMiddleware } from "./sample_routes/_middleware.ts";
import { AppBuilder } from "./sample_routes/AppBuilder.tsx";
import IslandPluginComponent from "./sample_routes/PluginRouteWithIsland.tsx";
import { SimpleRoute } from "./sample_routes/simple-route.tsx";
import AsyncRoute from "./sample_routes/async-route.tsx";
export type { Options };
interface Options {
title: string;
async: boolean;
}
export type PluginMiddlewareState = {
num: number;
@@ -45,6 +47,7 @@ export default function routePlugin(
path: "lots-of-middleware",
}],
routes: [
{ path: "/async-route", component: AsyncRoute },
{
path: "/_app",
component: AppBuilder(options),