Skip to content

Vite plugin is not using default openapi-ts config file #3792

@0xUnkn0wN

Description

@0xUnkn0wN

Description

If no additional config is set in vite.config.js for the Vite openapi-ts plugin, no client generation is happening on npm dev.

If I move the entries from openapi-ts.config.ts into vite.config.js like this:

export default defineConfig({
  plugins: [
    vue(),
    heyApiPlugin({
      config: {
        input: 'src/schema/catfact.json',
        output: 'src/client',
      },
    }),
  ],
});

All is working fine with npm dev

Reproducible example or configuration

https://stackblitz.com/edit/vitejs-vite-uukpfpms?file=vite.config.js

OpenAPI specification (optional)

No response

System information (optional)

No response

Metadata

Metadata

Labels

bug 🔥Broken or incorrect behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions