vite.config.js 442 B

12345678910111213141516171819202122
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import path from 'path'
  4. export default defineConfig({
  5. plugins: [vue()],
  6. resolve: {
  7. alias: {
  8. '@': path.resolve(__dirname, './src')
  9. }
  10. },
  11. server: {
  12. proxy: {
  13. '/api': {
  14. target: 'https://carsharing.kolei.ru',
  15. changeOrigin: true,
  16. secure: false,
  17. rewrite: (path) => path.replace(/^\/api/, '')
  18. }
  19. }
  20. }
  21. })