wallet.andert.me/vite.config.ts

18 lines
421 B
TypeScript
Raw Normal View History

2023-08-25 07:45:46 +00:00
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { fetchSchema } from './.wundergraph/schemas/fetch-schemas';
export default defineConfig({
plugins: [
sveltekit(),
{
name: 'fetch-schema',
apply: 'build',
configResolved(config) {
if (config.command === 'build' || config.command === 'serve') {
fetchSchemas().catch(console.error);
}
},
},
],
});