vite.config.js 364 B

1234567891011121314151617
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. // https://vitejs.dev/config/
  4. export default defineConfig({
  5. plugins: [vue()],
  6. server: {
  7. host: '0.0.0.0',
  8. proxy: {
  9. '^/api': {
  10. target: 'http://172.17.0.19:5680',
  11. changeOrigin: true,
  12. rewrite: (path) => path.replace(/^\/api/, '/')
  13. }
  14. }
  15. }
  16. })