# Framework Integrations API URL: /runtime/api/frameworks Framework helpers package Tau's required build, header, worker, and host-process invariants behind stable configuration seams that hold across every qualified framework version. ## Vite and React Router [#vite-and-react-router] `tauRuntime(options?){:ts}` returns an array of Vite plugins. Vite flattens nested plugin arrays, so place the result directly in `plugins` without spreading it: ```typescript import { reactRouter } from '@react-router/dev/vite'; import { tauRuntime } from '@taucad/runtime/vite'; import { defineConfig } from 'vite'; export default defineConfig({ plugins: [tauRuntime(), reactRouter()], }); ``` **`RuntimePluginOptions`** — Options for the {@link tauRuntime} Vite plugin. - **`crossOriginIsolation`** (`boolean | undefined`, optional) — Skip the cross-origin-isolation middleware. Set to `false` when the host already serves COOP/COEP headers (e.g. via Express middleware or platform headers). Defaults to `true`. **`RuntimeVitePlugin`** — Version-neutral public shape of a Vite plugin returned by Tau factories. Hook types remain internal so consumers can use the same factory with every supported Vite major without importing Tau's development-time Vite types. - **`name`** (`string`, required) `tauRuntime()` includes cross-origin-isolation middleware by default. Set `crossOriginIsolation: false` only when the production host owns those headers; the lower-level `crossOriginIsolation()` export installs only Vite dev/preview headers. React Router SSR response code applies the canonical headers: ```typescript import { applyHandleRequestHeaders } from '@taucad/runtime/react-router'; export function applyRuntimeHeaders(responseHeaders: Headers): void { applyHandleRequestHeaders(responseHeaders); } ``` Express and Connect hosts mount the server adapter without a cast: ```typescript import express from 'express'; import { coiMiddleware } from '@taucad/runtime/cross-origin-isolation/express'; const app = express(); app.use(coiMiddleware()); ``` `@taucad/runtime/cross-origin-isolation` also exports the raw header maps and appliers — `documentHeaders`, `subresourceHeaders`, `applyDocumentHeaders`, `applySubresourceHeaders` — plus the `IsolationStatus` / `IsolationFailureReason` diagnostic types for custom hosts. ## Next.js [#nextjs] `withTauRuntime()` composes application headers and bundler configuration into a `NextRuntimeConfig`. The same call configures Next.js 15's supported Webpack production path and Next.js 16's Turbopack path. ```typescript import { withTauRuntime } from '@taucad/runtime/nextjs/config'; export default withTauRuntime({ output: 'standalone', }); ``` **`NextConfig`** - **`allowedDevOrigins`** (`string[] | undefined`, optional) - **`exportPathMap`** (`((defaultMap: ExportPathMap, ctx: { dev: boolean; dir: string; outDir: string | null; distDir: string; buildId: string; }) => Promise | ExportPathMap) | undefined`, optional) - **`i18n`** (`I18NConfig | null | undefined`, optional) — Internationalization configuration Tags: @see [Internationalization docs](https://nextjs.org/docs/advanced-features/i18n-routing) - **`typescript`** (`TypeScriptConfig | undefined`, optional) Tags: @see [Next.js TypeScript documentation](https://nextjs.org/docs/app/api-reference/config/typescript) - **`typedRoutes`** (`boolean | undefined`, optional) — Enable type checking for Link and Router.push, etc. This feature requires TypeScript in your project. Tags: @see [Typed Links documentation](https://nextjs.org/docs/app/api-reference/config/typescript#statically-typed-links) - **`headers`** (`(() => Promise | Header[]) | undefined`, optional) — Headers allow you to set custom HTTP headers for an incoming request path. Tags: @see [Headers configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/headers) - **`rewrites`** (`(() => Promise | Rewrite[] | { beforeFiles?: Rewrite[]; afterFiles?: Rewrite[]; fallback?: Rewrite[]; }) | undefined`, optional) — Rewrites allow you to map an incoming request path to a different destination path. Tags: @see [Rewrites configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/rewrites) - **`redirects`** (`(() => Promise | Redirect[]) | undefined`, optional) — Redirects allow you to redirect an incoming request path to a different destination path. Tags: @see [Redirects configuration documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects) - **`excludeDefaultMomentLocales`** (`boolean | undefined`, optional) Tags: @see [Moment.js locales excluded by default](https://nextjs.org/docs/upgrading#momentjs-locales-excluded-by-default) - **`webpack`** (`NextJsWebpackConfig | null | undefined`, optional) — Before continuing to add custom webpack configuration to your application make sure Next.js doesn't already support your use-case Tags: @see [Custom Webpack Config documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/webpack) - **`trailingSlash`** (`boolean | undefined`, optional, default `false`) — By default Next.js will redirect urls with trailing slashes to their counterpart without a trailing slash. Tags: @see [Trailing Slash Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash) - **`env`** (`Record | undefined`, optional) — Next.js comes with built-in support for environment variables Tags: @see [Environment Variables documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/env) - **`distDir`** (`string | undefined`, optional) — Destination directory (defaults to `.next`) - **`cleanDistDir`** (`boolean | undefined`, optional) — The build output directory (defaults to `.next`) is now cleared by default except for the Next.js caches. - **`assetPrefix`** (`string | undefined`, optional) — To set up a CDN, you can set up an asset prefix and configure your CDN's origin to resolve to the domain that Next.js is hosted on. Tags: @see [CDN Support with Asset Prefix](https://nextjs.org/docs/app/api-reference/config/next-config-js/assetPrefix) - **`cacheHandler`** (`string | undefined`, optional) — The default cache handler for the Pages and App Router uses the filesystem cache. This requires no configuration, however, you can customize the cache handler if you prefer. Tags: @see [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching) and the [API Reference](https://nextjs.org/docs/app/api-reference/next-config-js/incrementalCacheHandlerPath). - **`adapterPath`** (`string | undefined`, optional) — Path to a custom adapter module for deployment platform integration. Can also be set via the `NEXT_ADAPTER_PATH` environment variable. - **`cacheHandlers`** (`{ [handlerName: string]: string | undefined; default?: string; remote?: string; static?: string; } | undefined`, optional) - **`cacheMaxMemorySize`** (`number | undefined`, optional) — Configure the in-memory cache size in bytes. Defaults to 50 MB. If `cacheMaxMemorySize: 0`, this disables in-memory caching entirely. Tags: @see [Configuring Caching](https://nextjs.org/docs/app/building-your-application/deploying#configuring-caching). - **`useFileSystemPublicRoutes`** (`boolean | undefined`, optional, default `true`) — By default, `Next` will serve each file in the `pages` folder under a pathname matching the filename. To disable this behavior and prevent routing based set this to `true`. Tags: @see [Disabling file-system routing](https://nextjs.org/docs/advanced-features/custom-server#disabling-file-system-routing) - **`generateBuildId`** (`(() => string | null | Promise) | undefined`, optional) Tags: @see [Configuring the build ID](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateBuildId) - **`generateEtags`** (`boolean | undefined`, optional) Tags: @see [Disabling ETag Configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/generateEtags) - **`pageExtensions`** (`string[] | undefined`, optional) Tags: @see [Including non-page files in the pages directory](https://nextjs.org/docs/app/api-reference/config/next-config-js/pageExtensions) - **`instrumentationClientInject`** (`string[] | undefined`, optional) — Module specifiers that are required for side effects on the client before hydration, in array order, ahead of the user's `instrumentation-client.{ts,js}`. Each entry may be a bare npm package name or a path relative to the project root. - **`compress`** (`boolean | undefined`, optional) Tags: @see [Compression documentation](https://nextjs.org/docs/app/api-reference/config/next-config-js/compress) - **`poweredByHeader`** (`boolean | undefined`, optional) Tags: @see [Disabling x-powered-by](https://nextjs.org/docs/app/api-reference/config/next-config-js/poweredByHeader) - **`images`** (`Partial | undefined`, optional) Tags: @see [Using the Image Component](https://nextjs.org/docs/app/api-reference/next-config-js/images) - **`devIndicators`** (`false | { position?: "top-left" | "top-right" | "bottom-left" | "bottom-right"; } | undefined`, optional) — Configure indicators in development environment - **`onDemandEntries`** (`{ maxInactiveAge?: number; pagesBufferLength?: number; } | undefined`, optional) — Next.js exposes some options that give you some control over how the server will dispose or keep in memory built pages in development. Tags: @see [Configuring `onDemandEntries`](https://nextjs.org/docs/app/api-reference/config/next-config-js/onDemandEntries) - **`deploymentId`** (`string | undefined`, optional) — A unique identifier for a deployment that will be included in each request's query string or header. - **`supportsImmutableAssets`** (`boolean | undefined`, optional) — Whether the deployment environment supports immutable assets (assets deployed to `_next/static/immutable` don't need a `?dpl` parameter and can be safely requested across deployments.) - **`basePath`** (`string | undefined`, optional) — Deploy a Next.js application under a sub-path of a domain Tags: @see [Base path configuration](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath) - **`sassOptions`** (`{ [key: string]: any; implementation?: string; } | undefined`, optional) Tags: @see [Customizing sass options](https://nextjs.org/docs/app/api-reference/next-config-js/sassOptions) - **`productionBrowserSourceMaps`** (`boolean | undefined`, optional) — Enable browser source map generation during the production build Tags: @see [Source Maps](https://nextjs.org/docs/advanced-features/source-maps) - **`reactCompiler`** (`boolean | ReactCompilerOptions | undefined`, optional) — Enable {@link https://nextjs.org/docs/app/api-reference/config/next-config-js/reactCompiler React Compiler in Next.js}. Configuration accepts partial config object of the Compiler. If provided, the Compiler will be enabled. - **`reactProductionProfiling`** (`boolean | undefined`, optional) — Enable react profiling in production - **`reactStrictMode`** (`boolean | null | undefined`, optional) — The Next.js runtime is Strict Mode-compliant. Tags: @see [React Strict Mode](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactStrictMode) - **`reactMaxHeadersLength`** (`number | undefined`, optional) — The maximum length of the headers that are emitted by React and added to the response. Tags: @see [React Max Headers Length](https://nextjs.org/docs/app/api-reference/config/next-config-js/reactMaxHeadersLength) - **`httpAgentOptions`** (`{ keepAlive?: boolean; } | undefined`, optional) — Next.js enables HTTP Keep-Alive by default. You may want to disable HTTP Keep-Alive for certain `fetch()` calls or globally. Tags: @see [Disabling HTTP Keep-Alive](https://nextjs.org/docs/app/api-reference/next-config-js/httpAgentOptions) - **`staticPageGenerationTimeout`** (`number | undefined`, optional, default `60`) — Timeout after waiting to generate static pages in seconds - **`crossOrigin`** (`"anonymous" | "use-credentials" | undefined`, optional) — Add `"crossorigin"` attribute to generated `