fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Hey API presents openapi-ts

Vite Plugin

Vite plugin for @hey-api/openapi-ts.

DevTrends badge for @hey-api/vite-plugin DevTrends badge for @hey-api/vite-plugin CI status GitHub stars MIT License

Manual  •  Issues  •  Contribute

About#

Vite is a blazing fast frontend build tool powering the next generation of web applications.

The Vite plugin integrates @hey-api/openapi-ts into the Vite build pipeline, running automatically whenever Vite resolves its configuration – no separate script or manual step required.

Part of the Hey API ecosystem.

Features#

  • runs automatically as part of your Vite build
  • reads your existing configuration (or accepts inline config)
  • works with any Vite-based project
  • sync with Hey API Registry for spec management

Contributing#

Want to see your code in products used by millions?

Start with our Contributing guide and release your first feature.

Sponsors#

Hey API is sponsor-funded. If you rely on Hey API in production, consider becoming a sponsor to accelerate the roadmap.

Gold

Stainless logo
Best-in-class developer interfaces for your API.
stainless.com

Opencode logo
The open source coding agent.
opencode.ai

Silver

Scalar logo
scalar.com
FastAPI logo
fastapi.tiangolo.com

Bronze

Kinde logo Cella logo

Installation#

You can download @hey-api/vite-plugin from npm using your favorite package manager.

npm#

npm add @hey-api/vite-plugin -D -E

pnpm#

pnpm add @hey-api/vite-plugin -D -E

yarn#

yarn add @hey-api/vite-plugin -D -E

bun#

bun add @hey-api/vite-plugin -D -E

Usage#

Add the plugin to your vite.config.ts:

import { heyApiPlugin } from '@hey-api/vite-plugin';
import { defineConfig } from 'vite';

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

The plugin will automatically pick up your configuration file. You can also pass options inline using the config option:

import { heyApiPlugin } from '@hey-api/vite-plugin';
import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [
    heyApiPlugin({
      config: {
        input: 'hey-api/backend', // sign up at app.heyapi.dev
        output: 'src/client',
      },
    }),
  ],
});

License#

Released under the MIT License.