Added a proxy to the vite.config.js

This commit is contained in:
2023-07-30 17:18:22 +02:00
parent c108b044ca
commit 8f8dbc201d

View File

@ -11,5 +11,13 @@ export default defineConfig({
"@states": path.resolve(__dirname, "./src/states"),
"@": path.resolve(__dirname, "./src"),
}
},
server: {
proxy: {
"/api": {
target: "http://localhost:8025",
rewrite: (path) => path.replace(/^\/api/, "")
}
})
}
}
});