Skip to content

Commit

Permalink
Replace CRA proxy config with vite's proxy config
Browse files Browse the repository at this point in the history
  • Loading branch information
ZauberNerd committed Jul 8, 2023
1 parent a3da33d commit 4b91a19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
1 change: 0 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"@types/uuid": "^9.0.1",
"@vitejs/plugin-react": "^4.0.2",
"babel-plugin-formatjs": "^10.5.3",
"http-proxy-middleware": "^2.0.6",
"typescript": "^4.9.5",
"vite": "^4.4.1",
"vite-plugin-comlink": "^3.0.5"
Expand Down
14 changes: 0 additions & 14 deletions app/src/setupProxy.js

This file was deleted.

9 changes: 9 additions & 0 deletions app/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ import { comlink } from "vite-plugin-comlink";

export default defineConfig(() => {
return {
server: {
proxy: {
"/chatapi": {
target: "http://localhost:3001",
secure: false,
changeOrigin: true,
},
},
},
build: {
outDir: "build",
},
Expand Down

0 comments on commit 4b91a19

Please sign in to comment.