vite.config.ts 790 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { fileURLToPath, URL } from "node:url";
  2. import { defineConfig } from "vite";
  3. import vue from "@vitejs/plugin-vue";
  4. import vueJsx from "@vitejs/plugin-vue-jsx";
  5. // https://vitejs.dev/config/
  6. export default defineConfig({
  7. plugins: [vue(), vueJsx()],
  8. resolve: {
  9. alias: {
  10. "@": fileURLToPath(new URL("./src", import.meta.url)),
  11. },
  12. },
  13. server: {
  14. //
  15. host: '0.0.0.0',
  16. port: 5274,
  17. proxy: {
  18. '/gw': {
  19. // target: 'http://localhost:8088',
  20. target: 'http://172.16.1.199:8088',
  21. changeOrigin: true,
  22. }
  23. }
  24. },
  25. css: {
  26. preprocessorOptions: {
  27. less: {
  28. modifyVars: {
  29. "primary-color": "#0079C2",
  30. "primary-1": "#E4F4FF",
  31. },
  32. javascriptEnabled: true,
  33. },
  34. },
  35. },
  36. });