vite.config.js 341 B

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