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/cli

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


Usage

webpack.config.ts
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

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