石墨仪设备 前端仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
659 B

6 months ago
6 months ago
  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. import vueDevTools from "vite-plugin-vue-devtools";
  6. // https://vite.dev/config/
  7. export default defineConfig({
  8. plugins: [vue(), vueJsx(), vueDevTools()],
  9. resolve: {
  10. alias: {
  11. "@": fileURLToPath(new URL("./src", import.meta.url)),
  12. },
  13. },
  14. server: {
  15. host: "0.0.0.0",
  16. port: 5174,
  17. proxy: {
  18. "/api": {
  19. // target: "http://192.168.1.118:8080",
  20. target: "http://localhost:8080",
  21. changeOrigin: true,
  22. // rewrite: (path) => path.replace(/^\/api/, ''),
  23. },
  24. },
  25. },
  26. });