feat: 联调

This commit is contained in:
秋水浮尘
2023-11-12 16:54:55 +08:00
parent 8a9d22e0aa
commit 5a17d2da74
14 changed files with 744 additions and 699 deletions

View File

@@ -1,10 +1,10 @@
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import { defineConfig, loadEnv } from 'vite'
const path = require('path')
// https://vitejs.dev/config/
export default ({ mode }) => {
const env = loadEnv(mode, process.cwd());
const env = loadEnv(mode, process.cwd())
return defineConfig({
resolve: {
alias: {
@@ -14,17 +14,21 @@ export default ({ mode }) => {
'@utils': path.resolve(__dirname, 'src/utils'),
'@components': path.resolve(__dirname, 'src/components'),
'@imgs': path.resolve(__dirname, 'src/imgs'),
'@constants': path.resolve(__dirname, 'src/constants'),
'@constants': path.resolve(__dirname, 'src/constants')
}
},
plugins: [react()],
server: {
proxy: {
"/subject": {
'/subject': {
target: env.VITE_API_HOST,
changeOrigin: true,
changeOrigin: true
},
},
'/auth': {
target: env.VITE_API_HOST,
changeOrigin: true
}
}
}
})
}