first commit
Made-with: Cursor
This commit is contained in:
23
vite.config.ts
Normal file
23
vite.config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
const apiProxy = {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:4242',
|
||||
changeOrigin: true,
|
||||
},
|
||||
}
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
host: true,
|
||||
port: 5173,
|
||||
proxy: apiProxy,
|
||||
},
|
||||
// `vite preview` does not inherit dev server proxy unless set here
|
||||
preview: {
|
||||
proxy: apiProxy,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user