Jotzy/frontend/vite.config.mts
james fitzsimons 2eb924dc9c Add Vitest setup and tests for encryption
- Set up Vitest with testing-library and jsdom for frontend tests - Add
encryption.test.ts to verify deriveKey, wrapMasterKey, unwrapMasterKey -
Add test/setup.ts to extend jest-dom matchers and cleanup after tests -
Enable Vitest in Vite config and add test scripts in
frontend/package.json
2025-12-13 12:15:14 +00:00

34 lines
947 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import tailwindcss from "@tailwindcss/vite";
import svgr from "vite-plugin-svgr";
import path from "path";
export default defineConfig({
plugins: [tailwindcss(), react(), svgr()],
test: {
globals: true,
environment: "jsdom",
setupFiles: "./src/test/setup.ts",
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@components": path.resolve(__dirname, "./src/components"),
"@pages": path.resolve(__dirname, "./src/pages"),
"@stores": path.resolve(__dirname, "./src/stores"),
"@api": path.resolve(__dirname, "./src/api"),
"@contexts": path.resolve(__dirname, "./src/contexts"),
"@assets": path.resolve(__dirname, "./src/assets"),
},
},
server: {
port: 5173,
proxy: {
"/api": {
target: "http://localhost:8000",
changeOrigin: true,
},
},
},
});