vite.config.js 499 B

12345678910111213141516171819202122
  1. import {defineConfig} from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. // https://vitejs.dev/config/
  4. export default defineConfig({
  5. plugins: [
  6. vue(),
  7. ],
  8. minify: 'terser',
  9. server: {
  10. open: true,
  11. proxy: {
  12. '/api': {
  13. // 正式环境地址
  14. target: 'https://dev.wutongresearch.club/api',
  15. changeOrigin: true,
  16. rewrite: (path) => path.replace(/^\/api/, ""),
  17. }
  18. }
  19. },
  20. })