Files
FastUI/demo/vite.config.ts
Samuel Colvin eb6147512c moving python
2023-11-12 20:15:23 +00:00

27 lines
512 B
TypeScript

import path from 'path'
import react from '@vitejs/plugin-react-swc'
import { defineConfig } from 'vite'
export default () => {
const serverConfig = {
host: true,
port: 3000,
proxy: {
'/api': 'http://localhost:8000',
},
}
return defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
fastui: path.resolve(__dirname, '../react/fastui'),
},
},
server: serverConfig,
preview: serverConfig,
})
}