init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server:{
|
||||
proxy:{
|
||||
//此处编写代理规则
|
||||
"/api":{
|
||||
target:"http://localhost:8080",
|
||||
changeOrigin:true,
|
||||
rewrite:path=>{
|
||||
return path.replace(/\/api/,'api/');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user