Study/vite.config.ts
Elijah 74a98ac1f1 Add the V2 web app: design system, shell, study flows, AI, settings, sharing
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-11 08:53:01 -07:00

31 lines
792 B
TypeScript

import { fileURLToPath } from 'node:url';
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
const api = process.env.API_ORIGIN ?? 'http://localhost:3726';
export default defineConfig({
root: 'web',
plugins: [react(), tailwindcss()],
resolve: {
alias: {
'@shared': fileURLToPath(new URL('./shared', import.meta.url)),
'@': fileURLToPath(new URL('./web/src', import.meta.url)),
},
},
server: {
port: 5173,
strictPort: false,
proxy: {
'/api': { target: api, changeOrigin: false },
'/media': { target: api, changeOrigin: false },
},
},
build: {
outDir: '../dist/web',
emptyOutDir: true,
sourcemap: false,
chunkSizeWarningLimit: 900,
},
});