memos/web/vite.config.ts

28 lines
539 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-07-10 04:02:56 +03:00
import { resolve } from "path";
2021-12-08 18:43:52 +03:00
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
cors: true,
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-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
},
},
2022-07-10 04:02:56 +03:00
resolve: {
alias: {
"@/": `${resolve(__dirname, "src")}/`,
},
},
2021-12-08 18:43:52 +03:00
});