vite.config.js 481 B

123456789101112131415161718192021
  1. import { defineConfig } from 'vite';
  2. import uni from '@dcloudio/vite-plugin-uni';
  3. export default defineConfig({
  4. plugins: [uni()],
  5. base:'/',
  6. server: {
  7. proxy: {
  8. '/api': {
  9. target: 'http://10.201.2.161:9400/centtenAdvise',
  10. changeOrigin: true,
  11. rewrite: (path) => path.replace(/^\/api/, '')
  12. },
  13. '/uploadApi':{
  14. target: 'http://10.200.1.115:9000/canttenadvice/',
  15. changeOrigin: true,
  16. rewrite: (path) => path.replace(/^\/uploadApi/, '')
  17. }
  18. }
  19. }
  20. });