We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0673f9d commit 21c6194Copy full SHA for 21c6194
2 files changed
.changeset/ten-candles-stick.md
@@ -0,0 +1,5 @@
1
+---
2
+"@hey-api/vite-plugin": patch
3
4
+
5
+**api**: expose `vite` options
packages/vite-plugin/src/index.ts
@@ -1,16 +1,22 @@
import { createClient } from '@hey-api/openapi-ts';
+import type { Plugin } from 'vite';
export function heyApiPlugin(options?: {
/**
6
* `@hey-api/openapi-ts` configuration options.
7
*/
8
config?: Parameters<typeof createClient>[0];
9
+ /**
10
+ * Vite plugin API options.
11
+ */
12
+ vite?: Omit<Plugin, 'configResolved' | 'name'>;
13
}) {
14
return {
15
+ enforce: 'pre',
16
+ ...options?.vite,
17
configResolved: async () => {
18
await createClient(options?.config);
19
},
- enforce: 'pre',
20
name: 'hey-api-plugin',
21
};
22
}
0 commit comments