2022-09-05 02:24:11 +08:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
|
2022-09-06 01:46:55 +08:00
|
|
|
// TODO: 动态导入,减少打包体积
|
2022-09-05 02:24:11 +08:00
|
|
|
// https://vitejs.dev/config/
|
|
|
|
export default defineConfig({
|
|
|
|
server: {
|
|
|
|
proxy: {
|
2022-09-06 01:05:29 +08:00
|
|
|
"/api/": {
|
2022-11-30 23:45:42 +08:00
|
|
|
target: "https://www.fadinglight.cn/api/",
|
2022-09-05 02:24:11 +08:00
|
|
|
changeOrigin: true,
|
|
|
|
rewrite: (path) => path.replace(/^\/api/, ""),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
plugins: [react()]
|
|
|
|
})
|