vite.config.ts 817 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. import {resolve} from "path";
  4. // https://vitejs.dev/config/
  5. export default defineConfig({
  6. plugins: [vue()],
  7. base: '/',
  8. resolve: {
  9. alias: {
  10. '@': resolve(__dirname, 'src'),
  11. },
  12. },
  13. server: {
  14. port: 6886,
  15. // open: true,
  16. https: false,
  17. base: './',
  18. host: '0.0.0.0',
  19. strictPort: false,
  20. proxy: {
  21. '/api': {
  22. // target: 'http://localhost:8080/',
  23. target: 'http://120.25.74.229:8000/',
  24. // target: 'http://192.168.1.110:8080/',
  25. changeOrigin: true,
  26. rewrite: path => {
  27. return path.replace(/^\/api/, '')
  28. }
  29. },
  30. }
  31. },
  32. build: {
  33. outDir: "social-management-screen",
  34. },
  35. publicDir: 'src/out',
  36. optimizeDeps: {
  37. include: []
  38. }
  39. })