vite.config.ts 392 B

12345678910111213141516171819
  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. port: 9666,
  8. host: '0.0.0.0',
  9. open: true,
  10. proxy: {
  11. '/api': {
  12. target: 'http://localhost:9777',
  13. changeOrigin: true,
  14. rewrite: (path) => path.replace(/^\/api/, '')
  15. }
  16. }
  17. }
  18. })