Skip to content

Instantly share code, notes, and snippets.

@Spikeysanju
Created March 6, 2024 09:19
Show Gist options
  • Save Spikeysanju/700ed038ba6eac1d6d683781d5f145d2 to your computer and use it in GitHub Desktop.
Save Spikeysanju/700ed038ba6eac1d6d683781d5f145d2 to your computer and use it in GitHub Desktop.
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 5173,
strictPort: true,
open: true,
proxy: {
'/api': {
target: 'https://expense-tracker.penneithendral.workers.dev',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
plugins: [react()],
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment