textmachine/frontend/vite.config.ts

17 lines
891 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
// Конфиг держим минимальным: в Vite 8 (Rolldown) часть старых опций стала молчаливым no-op,
// поэтому каждая строка ниже добавлена осознанно и с причиной.
export default defineConfig({
plugins: [react()],
// Lightning CSS вместо esbuild на минификации — пин STACK_DECISIONS §2.
build: { cssMinify: 'lightningcss' },
test: {
environment: 'happy-dom',
// По умолчанию Vitest отдаёт вместо CSS пустую заглушку — тогда контракт-тест токенов
// проверял бы пустоту и всегда был бы зелёным.
css: true,
include: ['src/**/*.test.{ts,tsx}'],
},
});