vite.config.js 378 B

123456789101112131415161718
  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:8080',
  10. changeOrigin: true,
  11. rewrite: (path) => path.replace(/^\/api/, ''),
  12. secure: false,
  13. ws: true
  14. }
  15. }
  16. }
  17. })