Skip to content

Commit

Permalink
Fixed proxy config.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwhitney committed May 27, 2024
1 parent ca18ba0 commit d61ddde
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions client/src/vite.env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/react": "npm:@types/react@^18.3.3"
},
"compilerOptions": {
"types": ["react", "react-dom", "@types/react", "vite/client"],
"types": ["react", "react-dom", "@types/react"],
"lib": ["dom", "dom.iterable", "esnext", "deno.ns"],
"jsx": "react-jsx",
"jsxImportSource": "react"
Expand Down
20 changes: 11 additions & 9 deletions vite.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "vite"
import react from "vitejs/plugin-react"
import "react"
import { defineConfig } from "vite";
import react from "vitejs/plugin-react";
import "react";
import "react-dom";

// https://vitejs.dev/config/
export default defineConfig({
Expand All @@ -9,12 +10,13 @@ export default defineConfig({
outDir: "../../dist"
},
server: {
port: 3000
},
proxy: {
'/api': {
target: 'http://localhost:8000',
changeOrigin: true
port: 3000,

proxy: {
'/api': {
target: 'http://localhost:8000',
changeOrigin: true
}
}
},
plugins: [react()],
Expand Down

0 comments on commit d61ddde

Please sign in to comment.