vite.config.ts 444 B

1234567891011121314151617
  1. import { defineConfig } from 'vite';
  2. import vue from '@vitejs/plugin-vue';
  3. // https://vitejs.dev/config/
  4. export default defineConfig({
  5. plugins: [vue()],
  6. server: {
  7. proxy: {
  8. // with options
  9. '/track_api': {
  10. target: 'https://v4-test.4dkankan.com/',
  11. changeOrigin: true,
  12. rewrite: (path) => path.replace(/^\/track_api/, ''),
  13. },
  14. },
  15. },
  16. });