mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-13 14:29:05 +02:00
27 lines
697 B
TypeScript
27 lines
697 B
TypeScript
import { paraglide } from '@inlang/paraglide-sveltekit/vite';
|
|
import { defineConfig } from 'vitest/config';
|
|
import { execSync } from "child_process";
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
{
|
|
name: "openapi-generate",
|
|
buildStart() {
|
|
console.log("Generating TypeScript client from OpenAPI...");
|
|
execSync("npx openapi-typescript ../../api/openapi.json --output src/lib/api/api.gen.ts", { stdio: "inherit" });
|
|
console.log("OpenAPI client generated!");
|
|
}
|
|
},
|
|
sveltekit(),
|
|
paraglide({
|
|
project: './project.inlang',
|
|
outdir: './src/lib/paraglide'
|
|
})
|
|
],
|
|
|
|
test: {
|
|
include: ['src/**/*.{test,spec}.{js,ts}']
|
|
}
|
|
});
|