vite.config.js 606 B

1234567891011121314151617181920212223242526
  1. import { defineConfig } from "vite";
  2. import vue from "@vitejs/plugin-vue";
  3. import basicSsl from "@vitejs/plugin-basic-ssl";
  4. import { fileURLToPath, URL } from "node:url";
  5. export default defineConfig({
  6. base: "./",
  7. // plugins: [vue(), basicSsl()],
  8. plugins: [vue()],
  9. server: {
  10. host: "0.0.0.0",
  11. // https: true,
  12. proxy: {
  13. "/api": {
  14. // target: "http://192.168.20.61:8118/",
  15. target: "https://sit-chaoxuept.4dage.com/",
  16. changeOrigin: true,
  17. },
  18. },
  19. },
  20. resolve: {
  21. alias: {
  22. "@": fileURLToPath(new URL("./src", import.meta.url)),
  23. },
  24. },
  25. });