22 lines
476 B
TypeScript
22 lines
476 B
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
|
|
const serverRoutes = ["/access", "/buy/start", "/buy/complete", "/buy/cancel"];
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
server: {
|
|
proxy: Object.fromEntries(
|
|
serverRoutes.map((key) => [
|
|
key,
|
|
{
|
|
target: "http://localhost:3000",
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
]),
|
|
),
|
|
},
|
|
plugins: [react()],
|
|
});
|