Package Exports
- @hey-api/vite-plugin
- @hey-api/vite-plugin/package.json
Readme
Vite Plugin
Vite plugin for @hey-api/openapi-ts.
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
|
|
|
Silver
|
scalar.com |
fastapi.tiangolo.com |
Bronze
|
|
Installation
You can download @hey-api/vite-plugin from npm using your favorite package manager.
npm
npm add @hey-api/vite-plugin -D -Epnpm
pnpm add @hey-api/vite-plugin -D -Eyarn
yarn add @hey-api/vite-plugin -D -Ebun
bun add @hey-api/vite-plugin -D -EUsage
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.