UNPKG

elysia-react-router

Version:

Use React Router v7 or Remix with Elysia with HMR support!

34 lines (31 loc) 1.1 kB
import { AppLoadContext } from '@remix-run/node'; import { AnyElysia } from 'elysia'; import { P as PluginOptions } from './types-CJri46dO.js'; import 'elysia/context'; import 'vite'; /** * Initializes and configures an Elysia server with Remix integration. * * This function sets up the Elysia server to handle Remix SSR (Server-Side Rendering) * and optionally integrates Vite for development mode. * * @deprecated This function will be reworked in future versions. * Please use reactRouter for better compatibility and features. * * @param {PluginOptions<AppLoadContext>} [options] - Optional configuration options for the plugin. * @returns {Promise<Elysia>} - A promise that resolves to the configured Elysia instance. * * @example * ```typescript * import { remix } from "elysia-remix"; * * new Elysia() * .use(await remix()) * .get("/some", "Hello, world!") * .listen(3000, console.log); * ``` * * @see https://remix.run/blog/incremental-path-to-react-19 */ declare function remix(options?: PluginOptions<AppLoadContext>): Promise<AnyElysia>; export { remix };