17 lines
566 B
TypeScript
17 lines
566 B
TypeScript
/// <reference types="vitest/config" />
|
|
import { defineConfig } from 'vite';
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
import pkg from './package.json' with { type: 'json' };
|
|
|
|
export default defineConfig({
|
|
plugins: [svelte()],
|
|
define: { __APP_VERSION__: JSON.stringify(pkg.version) },
|
|
// Test-only config; never enters the production bundle (vitest is dev-only).
|
|
// jsdom supplies a global DOMParser, so the export/import specs need no setup.
|
|
test: {
|
|
environment: 'jsdom',
|
|
include: ['tests/**/*.test.ts'],
|
|
globals: false,
|
|
},
|
|
});
|