24 lines
496 B
TypeScript
24 lines
496 B
TypeScript
import react from '@vitejs/plugin-react-swc'
|
|
import path from 'path'
|
|
import { defineConfig } from 'vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
shared: path.resolve(__dirname, 'shared'),
|
|
},
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8000',
|
|
changeOrigin: true,
|
|
rewrite: path => path.replace(/^\/api/, ''),
|
|
},
|
|
},
|
|
},
|
|
})
|