vite.config.js 338 B

12345678910111213141516
  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. proxy: {
  8. "/api": {
  9. target: "http://localhost:8080",
  10. changeOrigin: true,
  11. rewrite: path => path.replace(/^\/api/, '')
  12. },
  13. }
  14. }
  15. })