Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@
"@types/koa-json": "^2.0.18",
"@types/koa__router": "^8.0.2",
"@types/ws": "^7.2.6",
"@vitejs/plugin-vue": "^1.1.5",
"@vue/compiler-sfc": "^3.0.4",
"chokidar": "^3.4.0",
"concurrently": "^5.2.0",
"fast-glob": "^3.2.4",
"fs-extra": "^9.0.1",
"koa": "^2.13.1",
"koa-bodyparser": "^4.3.0",
"koa-error": "^3.2.0",
"koa-json": "^2.0.2",
"ts-node": "^8.10.2",
"ts-node-dev": "1.1.1",
"vite": "^1.0.0-rc.13",
"vite": "^2.0.4",
"ws": "^7.3.0"
}
}
2 changes: 1 addition & 1 deletion playground/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "..",
"extends": "../tsconfig.json",
"exclude": [],
"compilerOptions": {
"lib": ["ES2020", "DOM"],
Expand Down
24 changes: 16 additions & 8 deletions playground/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

const API_PORT = process.env.API_PORT || 3002

export default {
proxy: {
'/api': {
target: `http://localhost:${API_PORT}/`,
changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/api/, '')
export default defineConfig({
server: {
proxy: {
'/api': {
target: `http://localhost:${API_PORT}/`,
changeOrigin: true,
rewrite: (path: string) => path.replace(/^\/api/, '')
}
}
}
}
},
plugins: [
vue()
]
})
Loading