vite.config.js 434 B

12345678910111213141516171819202122
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import { fileURLToPath, URL } from 'node:url'
  4. export default defineConfig({
  5. plugins: [vue()],
  6. resolve: {
  7. alias: {
  8. '@': fileURLToPath(new URL('./src', import.meta.url))
  9. }
  10. },
  11. server: {
  12. host: '0.0.0.0',
  13. port: 5173,
  14. proxy: {
  15. '/api': {
  16. target: 'http://localhost:8000',
  17. changeOrigin: true
  18. }
  19. }
  20. }
  21. })