AA周年庆后台前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
640 B

1 month ago
1 month ago
1 month ago
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import path from 'path'
  4. export default defineConfig({
  5. plugins: [vue()],
  6. resolve: {
  7. alias: {
  8. '@': path.resolve(__dirname, './src')
  9. }
  10. },
  11. server: {
  12. proxy: {
  13. '/admin': {
  14. target: 'http://localhost:12699', // 后端基础地址https://dbqb.nfdxy.net/devLotApi
  15. changeOrigin: true,
  16. rewrite: (path) => path
  17. // 或者更精确的重写(根据后端路径调整):.replace(/^\/api/, '')
  18. // rewrite: (path) => path.replace(/^\/api\/admin/, '/admin'),
  19. },
  20. },
  21. },
  22. })