vite.config.js 406 B

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