주요 변경사항: • Clerk 인증 시스템 통합 및 설정 • Supabase 데이터베이스 스키마 설계 및 적용 • JWT 기반 Row Level Security (RLS) 정책 구현 • 기존 Appwrite 인증을 Clerk로 완전 교체 기술적 개선: • 무한 로딩 문제 해결 - Index.tsx 인증 로직 수정 • React root 마운팅 오류 수정 - main.tsx 개선 • CORS 설정 추가 - vite.config.ts 수정 • Sentry 에러 모니터링 통합 추가된 컴포넌트: • AuthGuard: 인증 보호 컴포넌트 • SignIn/SignUp: Clerk 기반 인증 UI • ClerkProvider: Clerk 설정 래퍼 • EnvTest: 개발환경 디버깅 도구 데이터베이스: • user_profiles, transactions, budgets, category_budgets 테이블 • Clerk JWT 토큰 기반 RLS 정책 • 자동 사용자 프로필 생성 및 동기화 Task Master: • Task 11.1, 11.2, 11.4 완료 • 프로젝트 관리 시스템 업데이트 Note: ESLint 정리는 별도 커밋에서 진행 예정 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
75 lines
2.1 KiB
TypeScript
75 lines
2.1 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react-swc";
|
|
import path from "path";
|
|
import { componentTagger } from "lovable-tagger";
|
|
import { visualizer } from "rollup-plugin-visualizer";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ mode }) => ({
|
|
server: {
|
|
host: "0.0.0.0",
|
|
port: 3000,
|
|
cors: true,
|
|
headers: {
|
|
"Access-Control-Allow-Origin": "*",
|
|
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
|
|
"Access-Control-Allow-Headers": "Content-Type, Authorization",
|
|
},
|
|
},
|
|
plugins: [
|
|
react(),
|
|
mode === "development" && componentTagger(),
|
|
visualizer({
|
|
filename: "dist/stats.html",
|
|
open: false,
|
|
gzipSize: true,
|
|
brotliSize: true,
|
|
}),
|
|
].filter(Boolean),
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
// Tree shaking 최적화
|
|
treeshake: {
|
|
moduleSideEffects: false,
|
|
propertyReadSideEffects: false,
|
|
},
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
// 벤더 라이브러리들을 별도 청크로 분리
|
|
vendor: ["react", "react-dom"],
|
|
router: ["react-router-dom"],
|
|
ui: [
|
|
"@radix-ui/react-dialog",
|
|
"@radix-ui/react-dropdown-menu",
|
|
"@radix-ui/react-select",
|
|
"@radix-ui/react-toast",
|
|
"@radix-ui/react-avatar",
|
|
"@radix-ui/react-label",
|
|
"@radix-ui/react-separator",
|
|
"@radix-ui/react-switch",
|
|
"@radix-ui/react-tabs",
|
|
"@radix-ui/react-alert-dialog",
|
|
"@radix-ui/react-progress",
|
|
"@radix-ui/react-slot",
|
|
],
|
|
charts: ["recharts"],
|
|
query: ["@tanstack/react-query", "@tanstack/react-query-devtools"],
|
|
appwrite: ["appwrite"],
|
|
sentry: ["@sentry/react", "@sentry/tracing"],
|
|
date: ["date-fns"],
|
|
utils: ["clsx", "class-variance-authority", "tailwind-merge"],
|
|
},
|
|
},
|
|
},
|
|
// 청크 크기 경고 임계값 조정
|
|
chunkSizeWarningLimit: 1000,
|
|
// 압축 최적화 (esbuild 사용)
|
|
minify: "esbuild",
|
|
},
|
|
}));
|