import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite'; // https://vite.dev/config/ export default defineConfig({ plugins: [react(), tailwindcss()], server: { proxy: { // Dev-only Yahoo Finance proxy to avoid browser CORS. // Frontend can call `/yahoo/...` and `/yahoo2/...` as same-origin. '/yahoo': { target: 'https://query1.finance.yahoo.com', changeOrigin: true, secure: true, rewrite: (path) => path.replace(/^\/yahoo/, ''), }, '/yahoo2': { target: 'https://query2.finance.yahoo.com', changeOrigin: true, secure: true, rewrite: (path) => path.replace(/^\/yahoo2/, ''), }, }, }, })