12345678910111213141516171819202122
  1. import { defineConfig } from 'vite'
  2. import vue from '@vitejs/plugin-vue'
  3. // import path from "path";
  4. // https://vitejs.dev/config/
  5. export default defineConfig({
  6. base: '',
  7. server:{
  8. host: '0.0.0.0',
  9. proxy: {
  10. '/api': {
  11. target: 'http://127.0.0.1:7937',
  12. }
  13. }
  14. },
  15. plugins: [vue()],
  16. resolve:{
  17. alias:{
  18. '@':'/src/', //格式一定要写对喽不然没有代码提示或者报错
  19. }
  20. }
  21. })