vite.config.js 433 B

123456789101112131415161718
  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. port: 8010,
  9. proxy: {
  10. "/api": {
  11. target: "http://127.0.0.1:8100",
  12. changeOrigin: true,
  13. rewrite: (path) => path.replace(/^\/api/, ""),
  14. }
  15. }
  16. }
  17. })