Plugins & Compilers
Bundler Adapters
Use Taser.js with Webpack, Rspack, Rollup, Rolldown, or Esbuild via @taserjs/plugin subpath exports.
Taser.js ships the same unplugin implementation for several bundlers. Each adapter exposes a taser() factory with the shared TaserPluginOptions used by Vite.
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/plugin @taserjs/cliInstall the bundler you use as a development dependency (webpack, @rspack/core, rollup, rolldown, or esbuild).
Usage
import { taser } from "@taserjs/plugin/webpack";
export default {
plugins: [taser()],
};Options
Plugin options: server, serverEntry, config, cwd, and standalone. Path layout (serverDir, routesDir, outputDir, app) comes from taserjs.config.ts. See the @taserjs/plugin API reference.
Subpath reference
| Import | Bundler |
|---|---|
@taserjs/plugin/webpack | Webpack |
@taserjs/plugin/rspack | Rspack |
@taserjs/plugin/rollup | Rollup |
@taserjs/plugin/rolldown | Rolldown |
@taserjs/plugin/esbuild | Esbuild |