Plugins & Compilers

Bundler Adapters

Use Taser with Webpack, Rspack, Rollup, Rolldown, or Esbuild via @taserjs/router-plugin subpath exports.

Taser ships the same unplugin implementation for several bundlers. Each adapter exposes a taser() plugin factory with the same options as the Vite plugin.

For new projects, prefer Vite or Vite + Nitro. Bundler adapters are for custom build pipelines that do not use Vite.


Installation

pnpm add @taserjs/router @taserjs/router-plugin

Install the bundler you use as a dev dependency (webpack, @rspack/core, rollup, rolldown, or esbuild).


Usage

webpack.config.ts
import { taser } from "@taserjs/router-plugin/webpack";

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

Options

Bundler plugins accept the same shared configuration as Vite (routesDir, entry / entryPath, serverEntry / serverEntryPath, basePath, ignore, and formatting options). See the router-plugin API reference.


Subpath reference

ImportBundler
@taserjs/router-plugin/webpackWebpack
@taserjs/router-plugin/rspackRspack
@taserjs/router-plugin/rollupRollup
@taserjs/router-plugin/rolldownRolldown
@taserjs/router-plugin/esbuildEsbuild