mirror of
https://github.com/Xevion/grain.git
synced 2025-12-05 21:15:07 -06:00
Major framework and tooling changes: - Migrate from React 19 to Preact 10 with preact-iso for routing - Replace @mantine/hooks with custom hooks (useBooleanToggle, useViewportSize) - Switch from @heroicons/react to lucide-preact for icons - Replace chance.js with random-js for RNG Testing infrastructure: - Add Vitest with @testing-library/preact and happy-dom - Set up test configuration and initial App tests - Add Vitest UI for interactive test running Build optimizations: - Add cssnano for CSS minification - Configure aggressive bundle optimizations in Vite - Update to Tailwind CSS 4.1.17 Project structure: - Consolidate entry point from main.tsx to index.tsx - Reorganize CSS location (styles/index.css → index.css) - Add ESLint with preact config - Update TypeScript configuration for Preact
29 lines
616 B
TypeScript
29 lines
616 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
import preact from "@preact/preset-vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [preact()],
|
|
test: {
|
|
environment: "happy-dom",
|
|
globals: true,
|
|
setupFiles: ["./src/test/setup.ts"],
|
|
coverage: {
|
|
reporter: ["text", "json", "html"],
|
|
exclude: [
|
|
"node_modules/",
|
|
"src/test/",
|
|
"**/*.config.ts",
|
|
"**/*.d.ts",
|
|
],
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"react": "preact/compat",
|
|
"react-dom": "preact/compat",
|
|
"react-dom/test-utils": "preact/test-utils",
|
|
},
|
|
dedupe: ["preact"],
|
|
},
|
|
});
|