28 lines
623 B
TypeScript
28 lines
623 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react-swc'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
envDir: './',
|
|
publicDir: "/recharge-print",
|
|
base: './',
|
|
server: {
|
|
port: 3001,
|
|
proxy: {
|
|
'/api': {
|
|
target: `http://localhost:8000/api`,
|
|
changeOrigin: true,
|
|
secure: false,
|
|
rewrite: path => path.replace(/^\/api/, "")
|
|
},
|
|
'/test': {
|
|
target: `http://127.0.0.1:8081`,
|
|
changeOrigin: true,
|
|
secure: false,
|
|
rewrite: path => path.replace(/^\/test/, "")
|
|
}
|
|
}
|
|
}
|
|
})
|