memos/web/vite.config.ts

27 lines
577 B
TypeScript
Raw Normal View History

2021-12-08 18:43:52 +03:00
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
2022-09-18 06:58:03 +03:00
import { VitePWA } from "vite-plugin-pwa";
2021-12-08 18:43:52 +03:00
// https://vitejs.dev/config/
export default defineConfig({
2022-09-18 06:58:03 +03:00
plugins: [react(), VitePWA()],
2021-12-08 18:43:52 +03:00
server: {
2022-09-09 02:40:21 +03:00
host: "0.0.0.0",
2022-07-14 14:33:20 +03:00
port: 3000,
2021-12-08 18:43:52 +03:00
proxy: {
"/api": {
2022-02-04 14:17:11 +03:00
target: "http://localhost:8080/",
2021-12-08 18:43:52 +03:00
changeOrigin: true,
},
2022-09-09 02:40:21 +03:00
"/o/": {
target: "http://localhost:8080/",
changeOrigin: true,
},
2022-02-04 14:17:11 +03:00
"/h/": {
2022-02-05 19:13:15 +03:00
target: "http://localhost:8080/",
changeOrigin: true,
},
2021-12-08 18:43:52 +03:00
},
},
});