Reference

@reckona/mreact-router/vite

7 public exports.

Function

FunctioncreateAppRouterViteMiddlewarefunction createAppRouterViteMiddleware(options: AppRouterViteMiddlewareOptions): NextHandleFunctionCreates Connect middleware that renders app-router requests during Vite development.FunctioncreateAppRouterVitePluginfunction createAppRouterVitePlugin(options: AppRouterVitePluginOptions): PluginCreates the app-router Vite plugin for route compilation and development middleware.FunctionmreactRouterConfigFromPluginsfunction mreactRouterConfigFromPlugins(plugins: readonly unknown[]): ResolvedAppRouterProject | undefinedReads resolved app-router project config from a Vite plugin list.FunctionrenderAppRouterClientAssetfunction renderAppRouterClientAsset(appDir: string, pathname: string, options: { dev?: boolean; vitePlugins?: readonly PluginOption[] }): Promise<Response>Renders a development client asset generated by the app-router Vite integration.

Interface

InterfaceAppRouterViteMiddlewareOptionsinterface AppRouterViteMiddlewareOptionsConfigures the app-router Vite middleware used by development servers.InterfaceAppRouterVitePluginOptionsinterface AppRouterVitePluginOptionsConfigures the app-router Vite plugin.

Variable

VariablemreactRouterconst mreactRouter: (options: AppRouterVitePluginOptions): PluginAlias for `createAppRouterVitePlugin()` used by Vite config files.