Files
Dock-Dploy/vite.config.ts
hhftechnologies 06fc45b87a Add ESLint, compose-builder, YAML utils & tests
Introduce a project-wide ESLint configuration with TypeScript/React rules (including a ban on direct useEffect and inline style object literals) and file-specific overrides. Update index.html to add theme-color meta tags and preload Google fonts. Expand package.json with new scripts (lint, typecheck, validate, extended test commands) and bump/add dev/dependencies for testing, linting, Radix UI, TanStack and tooling. Add many new components and tests (BrandMark, SetupSidebar, compose-builder UI and ServiceForm tabs, VPN tab, CodeMirror runtime, ThemeProvider, template UI and tests, icons), update existing components (CodeEditor, ConversionDialog, Header, Footer, MetaTags, SidebarUI) and hooks/routes. Add YAML generator and related utils, validation schemas, and numerous unit tests and fixtures. Misc: update tsconfig/vite config and styles.
2026-05-11 17:48:46 +05:30

43 lines
1.1 KiB
TypeScript

import { defineConfig } from "vitest/config";
import viteReact from "@vitejs/plugin-react";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { tanstackRouter } from "@tanstack/router-plugin/vite";
import tailwindcss from "@tailwindcss/vite";
const __filename = fileURLToPath(import.meta.url);
const __dirname = resolve(__filename, "..");
export default defineConfig({
plugins: [
tanstackRouter({ autoCodeSplitting: true, target: "react" }),
viteReact(),
tailwindcss(),
],
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
test: {
environment: "jsdom",
globals: true,
css: true,
setupFiles: ["./src/__tests__/setup.ts"],
include: ["src/**/*.{test,spec}.{ts,tsx}"],
coverage: {
provider: "v8",
reporter: ["text", "html", "lcov"],
include: ["src/**/*.{ts,tsx}"],
exclude: [
"src/**/*.{test,spec}.{ts,tsx}",
"src/__tests__/**",
"src/routeTree.gen.ts",
"src/main.tsx",
"src/reportWebVitals.ts",
],
},
},
});