Manual • Issues • Contribute
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.
- runs automatically as part of your Vite build
- reads your existing configuration (or accepts inline config)
- supports Vite 5, 6, 7, and 8
- sync with Hey API Registry for spec management
Want to see your code in products used by millions?
Start with our Contributing guide and release your first feature.
Partners behind the future of API tooling. Become a sponsor.
|
|
|
scalar.com |
fastapi.tiangolo.com |
getunblocked.com |
|
|
You can download @hey-api/vite-plugin from npm using your favorite package manager.
npm install @hey-api/vite-plugin -D -Epnpm add @hey-api/vite-plugin -D -Eyarn add @hey-api/vite-plugin -D -Ebun add @hey-api/vite-plugin -DAdd 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',
},
}),
],
});Released under the MIT License.
