mirror of
https://github.com/open-reception/appointment-booking-software.git
synced 2026-08-17 21:25:52 +02:00
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
import { paraglideVitePlugin } from "@inlang/paraglide-js";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { svelteTesting } from "@testing-library/svelte/vite";
|
|
import { sveltekit } from "@sveltejs/kit/vite";
|
|
import { defineConfig } from "vitest/config";
|
|
import { readFileSync } from "fs";
|
|
|
|
const pkg = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
tailwindcss(),
|
|
sveltekit(),
|
|
paraglideVitePlugin({ project: "./project.inlang", outdir: "./src/i18n" }),
|
|
],
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(pkg.version),
|
|
},
|
|
test: {
|
|
projects: [
|
|
{
|
|
extends: "./vite.config.ts",
|
|
plugins: [svelteTesting()],
|
|
test: {
|
|
name: "client",
|
|
environment: "jsdom",
|
|
clearMocks: true,
|
|
include: ["src/**/*.svelte.{test,spec}.{js,ts}"],
|
|
exclude: ["src/lib/server/**"],
|
|
setupFiles: ["./vitest-setup-client.ts"],
|
|
},
|
|
},
|
|
{
|
|
extends: "./vite.config.ts",
|
|
test: {
|
|
name: "server",
|
|
environment: "node",
|
|
include: ["src/**/*.{test,spec}.{js,ts}"],
|
|
exclude: ["src/**/*.svelte.{test,spec}.{js,ts}"],
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|