vite.config.ts 522 B

12345678910111213141516171819202122232425
  1. import { resolve } from "path";
  2. import { defineConfig } from "vite";
  3. import react from "@vitejs/plugin-react";
  4. export default defineConfig({
  5. plugins: [react()],
  6. build: {
  7. rollupOptions: {
  8. input: {
  9. main: resolve(__dirname, "index.html"),
  10. categoryTree: resolve(__dirname, "category-tree.html"),
  11. },
  12. },
  13. },
  14. server: {
  15. host: "0.0.0.0",
  16. port: 5173,
  17. proxy: {
  18. "/demand/api/v1": {
  19. target: "http://localhost:8000",
  20. changeOrigin: true
  21. }
  22. }
  23. }
  24. });