Skip to content

Instantly share code, notes, and snippets.

@Blazing-Mike
Created October 29, 2022 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Blazing-Mike/16120ffb6f421c541122306f1f393432 to your computer and use it in GitHub Desktop.
Save Blazing-Mike/16120ffb6f421c541122306f1f393432 to your computer and use it in GitHub Desktop.
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
server: {
proxy: {
"/api": {
target: "http://localhost:3001",
changeOrigin: true,
secure: false,
ws: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
port: 3000,
},
plugins: [react()],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment