forked from polka_billy/porridger
Added TypeScript for frontend
Added type definitions for components, functions, data Added guards for network responses fixes #8
This commit is contained in:
19
front/vite.config.ts
Normal file
19
front/vite.config.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
const BACK_ADDRESS = 'http://127.0.0.1:8000'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(
|
||||
({ command }) => ({
|
||||
base: (command === 'serve') ? "/" : "/static",
|
||||
plugins: [react()],
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': BACK_ADDRESS,
|
||||
'/static': BACK_ADDRESS,
|
||||
'/uploads': BACK_ADDRESS
|
||||
}
|
||||
}
|
||||
})
|
||||
)
|
Reference in New Issue
Block a user