bill-react/vite.config.ts

18 lines
401 B
TypeScript
Raw Permalink Normal View History

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