@relevate/unplugin-poolster

Run Poolster OpenAPI generation from Vite, Rollup, webpack, esbuild, Rspack, Rolldown, Farm, Nuxt, and Astro builds.
197 3
Install
npm install @relevate/unplugin-poolster
Latest Version:0.1.0-alpha.1
Vue:3
License:MIT
Last Updated:Oct 24, 2026
Links: GitHub  ·  npm
Maintainer: kaanmol

@relevate/unplugin-poolster

Generate Poolster SDKs as part of a Vite, Rollup, webpack, esbuild, Rspack, Rolldown, Farm, Nuxt, or Astro build. The plugin runs the installed native poolster CLI before each build and regenerates when the recipe or local OpenAPI source changes.

npm install --save-dev poolster @relevate/unplugin-poolster unplugin

Vite

// vite.config.ts
import { defineConfig } from 'vite';
import poolster from '@relevate/unplugin-poolster/vite';

export default defineConfig({
  plugins: [poolster({ config: 'poolster.json' })],
});

Use the /rollup, /webpack, /esbuild, /rspack, /rolldown, or /farm entry point for the equivalent unplugin adapter. Nuxt projects can use the /nuxt module and Astro projects can use the /astro integration. The root entry point is a dependency-free Rollup/Vite-style plugin if an adapter is not needed:

const poolster = require('@relevate/unplugin-poolster');

module.exports = { plugins: [poolster()] };

Options

config defaults to poolster.json, and generates with poolster generate --config poolster.json. The recipe and its local openapi.input are watched automatically. Include local $ref files or any other contract dependencies with watchFiles:

poolster({
  config: 'api/poolster.json',
  watchFiles: ['api/components/common.yaml'],
})

For direct CLI generation, supply exact arguments and disable the implicit recipe:

poolster({
  config: false,
  args: ['generate', 'openapi.yaml', '--output', 'src/generated', '--language', 'typescript'],
})

Other options are cwd, env, watch (defaults to true), silent, and onGenerate. command can point to a local Poolster executable; by default the plugin resolves the poolster launcher from the consuming project.

The plugin never serves generated code as a virtual module. Point normal source imports at Poolster's configured output directory. Remote OpenAPI URLs are generated during the initial build but are not polled; use a local downloaded contract if watch-mode refreshes are needed.

Development

node --test packages/integrations/unplugin/test/*.test.cjs

Related Packages

unplugin-kubb

Integration of Kubb for Vite, webpack, Rollup, Rolldown, Rspack, esbuild, Farm,...

328,886 1,825
unplugin-lightningcss

Lightning CSS integration for Vite, Rollup, esbuild, Webpack, Vue CLI, and more.

1,880,181 29
unplugin-strip-whitespace

Unplugin to strip inter-node whitespace in Astro and Svelte templates (Vite/Roll...

787 0
@vue.ts/complex-types

Resolve complex types in Vue SFCs.

11,656 112
@powerlines/unplugin

A package containing a Powerlines plugin to assist in developing other Powerline...

136,602 3

Version History

Pre-releases (2)
Version Released Vue License
0.1.0-alpha.1 ^3.0 MIT
0.0.0-stage