@sveltejs/kit/adapter
import { import applyRerouteapplyReroute } from '@sveltejs/kit/adapter';applyReroute
Available since 2.51.0
If your deployment platform supports splitting your app into multiple functions,
you should run this in a middleware that runs before the main handler
to reroute the request to the correct function and generate a server-side manifest
with the rerouteMiddleware option set to true.
import { import applyRerouteapplyReroute } from '@sveltejs/kit/adapter';
// replace __HOOKS__ with the path to the reroute hook obtained from `builder.getReroutePath()`
import { import reroutereroute } from '__HOOKS__';
export default function function middleware(request: any): anymiddleware(request: anyrequest) {
return import applyRerouteapplyReroute(request: anyrequest.url, import reroutereroute);
}function applyReroute(
url: string,
reroute: import('@sveltejs/kit').Reroute
): Promise<URL>;Edit this page on GitHub llms.txt
previous next