API Reference

@taserjs/router-plugin

Complete API reference and configuration options for @taserjs/router-plugin across Vite, Next.js App Router, and Nitro server environments.

The @taserjs/router-plugin package provides framework adapters, virtual module compilation, and ambient TypeScript generation for Vite, Next.js, and Nitro.


Exports Overview

Subpath ExportDescriptionTarget Framework
@taserjs/router-plugin/viteVite compiler plugin with virtual routing and HMRVite, TanStack Start
@taserjs/router-plugin/nextNext.js curried configuration wrapperNext.js App Router
@taserjs/router-plugin/nitroNitro server engine moduleStandalone Nitro, Nuxt
@taserjs/router-plugin/webpackWebpack pluginWebpack
@taserjs/router-plugin/rspackRspack pluginRspack
@taserjs/router-plugin/rollupRollup pluginRollup
@taserjs/router-plugin/rolldownRolldown pluginRolldown
@taserjs/router-plugin/esbuildEsbuild pluginEsbuild

The package root (@taserjs/router-plugin) is not part of the public API. @taserjs/router-plugin/runtime is reserved for generated app code.


Vite Plugin (@taserjs/router-plugin/vite)

import { taser } from "@taserjs/router-plugin/vite";

export default defineConfig({
  plugins: [taser(options?)],
});

TaserPluginOptions

Prop

Type


Next.js Plugin (@taserjs/router-plugin/next)

import createTaser from "@taserjs/router-plugin/next";

const withTaser = createTaser(options?);
export default withTaser(nextConfig);

TaserNextOptions

Prop

Type


Nitro Module (@taserjs/router-plugin/nitro)

import { taser } from "@taserjs/router-plugin/nitro";

export default defineConfig({
  modules: [taser(options?)],
});

TaserNitroOptions

Prop

Type