Add proxy for the dev server
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -6,6 +6,14 @@ import { fileURLToPath, URL } from "node:url";
|
|||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react({ babel: { plugins: ["relay"] } }), tailwindcss()],
|
plugins: [react({ babel: { plugins: ["relay"] } }), tailwindcss()],
|
||||||
|
server: {
|
||||||
|
proxy: {
|
||||||
|
"/api": {
|
||||||
|
target: "http://localhost:8080",
|
||||||
|
changeOrigin: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"/type": fileURLToPath(new URL("./src/type.ts", import.meta.url)),
|
"/type": fileURLToPath(new URL("./src/type.ts", import.meta.url)),
|
||||||
|
|||||||
Reference in New Issue
Block a user