Files
learning-platform/vite.config.js
RaymondVerhoef 775c3030d5
All checks were successful
On Push to Main / test (push) Successful in 29s
On Push to Main / publish (push) Successful in 59s
On Push to Main / deploy-dev (push) Successful in 1m33s
feat: implement PocketBase database schema setup script and core API service for content management
2026-05-17 14:18:26 +02:00

25 lines
672 B
JavaScript

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: {
'/api/anthropic': {
target: 'https://api.anthropic.com',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api\/anthropic/, ''),
configure: (proxy) => {
proxy.on('proxyReq', (proxyReq) => {
if (process.env.ANTHROPIC_API_KEY) {
proxyReq.setHeader('x-api-key', process.env.ANTHROPIC_API_KEY);
}
});
}
}
}
}
})