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-pluginInstall the bundler you use as a dev dependency (webpack, @rspack/core, rollup, rolldown, or esbuild).
Usage
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
| Import | Bundler |
|---|---|
@taserjs/router-plugin/webpack | Webpack |
@taserjs/router-plugin/rspack | Rspack |
@taserjs/router-plugin/rollup | Rollup |
@taserjs/router-plugin/rolldown | Rolldown |
@taserjs/router-plugin/esbuild | Esbuild |
Nitro Module
Deploy Taser across edge, serverless, and multi-cloud runtimes using the @taserjs/router-plugin/nitro module with automatic route registration.
Deployment Presets
Deploy Taser APIs across Cloudflare Workers, Vercel, AWS Lambda, Node.js, Bun, Deno, and Netlify using multi-cloud Nitro server presets.