vite.config.js 441 B

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