Files
pua/landing/vite.config.ts
xsser 1e0100d6a5 fix: restore landing/ with Cloudflare Functions to fix #89
All 5 API endpoints (/api/me, /api/auth/github, /api/auth/callback,
/api/upload, /api/auth/logout) were returning SPA index.html instead
of executing serverless functions because the landing/ directory was
removed from the repo and gitignored.

This caused GitHub OAuth to "redirect back to main page" as reported
in #89 — clicking Login with GitHub navigated to /api/auth/github
which served the SPA without any hash, rendering the landing page.

Restores:
- Cloudflare Pages Functions (auth, upload, session)
- D1 migration schema
- R2 upload configuration
- wrangler.toml deployment config

Closes #89
2026-03-18 12:46:27 +08:00

14 lines
299 B
TypeScript

import path from "path"
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
})